Bug 67840 - [i965 Bisected]Ogles2conform GL2ExtensionTests/egl_image_external/TestGetActiveUniform.test fails
Summary: [i965 Bisected]Ogles2conform GL2ExtensionTests/egl_image_external/TestGetActi...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Ian Romanick
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-06 19:13 UTC by Ian Romanick
Modified: 2015-05-26 10:42 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Ian Romanick 2013-08-06 19:13:22 UTC
System Environment:
--------------------------
Platform:     Ironlake/Sandybridge/Ivybridge/Haswell
Libdrm:		(master)libdrm-2.4.46-3-g6e8f868e034531b66a215e4e6d978b43b58b92d0
Mesa:		(master)8edb79f1ef95581c20ed0c3dc49aabe99d7f072a
Xserver:	(master)xorg-server-1.14.99.1-170-gb6e5c4669e0db391966deb397e8c975ec7f0124d
Xf86_video_intel:(master)2.21.13-43-g5287660aafe45859c07874c22dca99c1ff5e555a
Cairo:		(master)3cd6c5966aca1d202744fe44083800bc2a4a831d
Libva:		(staging)bc49c42bcbfb24286c06b3e7cdb171b2a01c6f80
Libva_intel_driver:(staging)b3afeef8092dc4eb7cb73fce672ddf7a55205f34
Kernel:	(drm-intel-nightly) 353890ae582631254dd0920b707d3a320908242e

Bug detailed description:
-------------------------
It segfaults on Ironlake/Sandybridge/Ivybridge/Haswell with mesa master branch. It works well on 9.2 branch.
Following cases segfault with same bisect commit:
GL2ExtensionTests/egl_image_external/TestTargetTextureInvalid.test	
GL2ExtensionTests/egl_image_external/TestTargetTextureSupported.test	
GL2ExtensionTests/egl_image_external/TestTargetTextureValid.test
GL2ExtensionTests/egl_image_external/TestSimpleUnassociated.test


Bisect shows:f5947c2bc72a630d1abd2a12221d8dafd3a24be4 is the first bad commit.
commit f5947c2bc72a630d1abd2a12221d8dafd3a24be4
Author:     Topi Pohjolainen <topi.pohjolainen@intel.com>
AuthorDate: Mon Nov 12 13:38:08 2012 +0200
Commit:     Topi Pohjolainen <topi.pohjolainen@intel.com>
CommitDate: Fri Aug 2 08:56:03 2013 +0300

    i965: enable image external sampling for imported dma-buffers

    Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
    Reviewed-by: Chad Versace <chad.versace@linux.intel.com>



Reproduce steps:
----------------------------
1.  xinit
2. ./GTF -width=64 -height=64 -run=GL2ExtensionTests/egl_image_external/TestGetActiveUniform.test
Comment 1 Ian Romanick 2013-08-07 23:17:54 UTC
The test is just broken.  It puts the #extension line *after* the first line of code.  The OpenGL GLSL ES spec says:

    "If nothing is said, the granularity is a single compilation unit,
    and the extension directives must occur before any non-preprocessor
    tokens."
Comment 2 Ian Romanick 2013-08-07 23:24:30 UTC
Moving the #extension line earlier in the shader fixes the compilation problem, anyway.  It looks like we need to implement GTFCreateEGLImageExternal and GTFDestroyEGLImageExternal in the test suite.  Since GTFCreateEGLImageExternal always returns NULL, that explains the segfault. :)
Comment 3 Ian Romanick 2013-08-07 23:28:13 UTC
It also appears that the test shader has been fixed since the gles3conform tarball was created.  The version in svn is correct.
Comment 4 lu hua 2013-11-19 00:46:25 UTC
It also happens on mesa 10.0 branch.
Comment 5 Topi Pohjolainen 2013-11-21 09:49:03 UTC
Like Ian commented, the segfault takes place in the test bench itself due to missing logic. It will do so regardless of which opengl stack is used in case the stack declares image external as supported.
Comment 6 Eero Tamminen 2013-11-21 11:59:14 UTC
(In reply to comment #1)
> The test is just broken.  It puts the #extension line *after* the first line
> of code.

There's a Mesa bug 71591 about that because competing graphics drivers allow #extension line also elsewhere, and because that behaviour seems to be quite common.
Comment 7 Chad Versace 2013-11-25 19:03:47 UTC
I believe Topi fixed this in OTC's gles3conform tree. Someone should backport his fix to our gles2conform tree.
Comment 8 lu hua 2014-08-01 05:55:18 UTC
It still fails on OTC' tree.
It works well in the updated gles3 conformance tests.
Comment 9 Tapani Pälli 2015-05-26 10:42:04 UTC
I don't know what 'OTC tree' refers to but this has been fixed in recent versions of the conformance suite.

/glcts --deqp-case=ES2-CTS.gtf.GL2ExtensionTests.egl_image_external.TestGetActiveUniform

dEQP Core GL-CTS-2.0 (0x0052484b) starting..
  target implementation = 'X11'

Test case 'ES2-CTS.gtf.GL2ExtensionTests.egl_image_external.TestGetActiveUniform'..
  Pass (Pass)

DONE!

Test run totals:
  Passed:        1/1 (100.00%)
  Failed:        0/1 (0.00%)
  Not supported: 0/1 (0.00%)
  Warnings:      0/1 (0.00%)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.