Bug 104154 - [OpenGL CTS] KHR-GL46.get_texture_sub_image.errors_test sometimes fails in a full run
Summary: [OpenGL CTS] KHR-GL46.get_texture_sub_image.errors_test sometimes fails in a ...
Status: RESOLVED NOTOURBUG
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: 102590
  Show dependency treegraph
 
Reported: 2017-12-07 07:56 UTC by Kenneth Graunke
Modified: 2017-12-15 01:51 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Kenneth Graunke 2017-12-07 07:56:42 UTC
KHR-GL46.get_texture_sub_image.errors_test appears to fail in some configs when run with cts-runner --type=gl46.  It's shows up as an INVALID_OPERATION vs. some other error enum problem.  It doesn't appear to happen when run outside of that environment, even with the same deqp command line options.

Maybe some texture is hanging around from earlier tests and it's getting the wrong one?
Comment 1 Ian Romanick 2017-12-11 19:46:56 UTC
I think there's a CTS bug about spurious INVALID_OPERATION errors, so this may not be our problem.
Comment 2 Ian Romanick 2017-12-13 03:24:00 UTC
In the passing version of the test, Mesa logs the following messages:

Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(xoffset = -1)
Mesa: User error: GL_INVALID_VALUE in glGetCompressedTextureImage(xoffset = -1)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(xoffset 2 + width 4 > 2)
Mesa: User error: GL_INVALID_VALUE in glGetCompressedTextureImage(xoffset 4 + width 8 > 4)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(1D, yoffset = 1)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(1D, height = 2)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(zoffset = 1)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(zoffset = 1)
Mesa: User error: GL_INVALID_VALUE in glGetCompressedTextureImage(zoffset = 1)

In the failing version of the test, Mesa logs the following messages:

Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(xoffset = -1)
Mesa: User error: GL_INVALID_VALUE in glGetCompressedTextureImage(xoffset = -1)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(xoffset 2 + width 4 > 2)
Mesa: User error: GL_INVALID_VALUE in glGetCompressedTextureImage(xoffset 4 + width 8 > 4)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(1D, yoffset = 1)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(zoffset = 1)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(zoffset = 1)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(zoffset = 1)
Mesa: User error: GL_INVALID_OPERATION in glGetCompressedTextureImage(texture)

Two lines are different.  The last line is different enough that a different error message is generated, but a couple line before that has

Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(1D, height = 2)

vs

Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(zoffset = 1)

I'm a little suspicious that this could be some sort of meta-related texture namespace pollution.  I fixed a bunch of this a couple years ago, but I don't think I got all of it.  That at least would explain why the bug only occurs after hours (around 10 hours on my BDW with a debug build) of running.
Comment 3 Ian Romanick 2017-12-13 03:27:22 UTC
(In reply to Ian Romanick from comment #2)
> I'm a little suspicious that this could be some sort of meta-related texture
> namespace pollution.  I fixed a bunch of this a couple years ago, but I
> don't think I got all of it.  That at least would explain why the bug only
> occurs after hours (around 10 hours on my BDW with a debug build) of running.

It looks like my meta-cannot-use-Gen branch may have some fixes.  I'll see if I can rebase these on almost 2 years of changes (ouch!), and I'll let that run overnight to see if it fixes it...
Comment 4 Ian Romanick 2017-12-14 05:58:23 UTC
Texture object namespace pollution does not seem to be the problem.

I added some more debug information to various paths through glGetCompressedTextureImage (note: this is the DSA flavor).  Output of the good:

Mesa: User error: GL_INVALID_OPERATION in glGetTextureParameterfv(texture = 1)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureParameterIiv(texture = 1)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureParameterIuiv(texture = 1)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureParameteriv(texture = 1)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureParameterfv(target)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureParameterIiv(target)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureParameterIuiv(target)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureParameteriv(target)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureSubImage(texture = 103386)
Mesa: User error: GL_INVALID_OPERATION in glGetCompressedTextureImage(texture = 103386)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureSubImage(buffer/multisample texture)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(xoffset = -1)
Mesa: User error: GL_INVALID_VALUE in glGetCompressedTextureImage(xoffset = -1)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(xoffset 2 + width 4 > 2)
Mesa: User error: GL_INVALID_VALUE in glGetCompressedTextureImage(xoffset 4 + width 8 > 4)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(target = GL_TEXTURE_1D, texture = 103380, yoffset = 1)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(target = GL_TEXTURE_1D, texture = 103380, height = 2)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(target = GL_TEXTURE_1D_ARRAY, texture = 103381, zoffset = 1)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(target = GL_TEXTURE_2D, texture = 103382, zoffset = 1)
Mesa: User error: GL_INVALID_VALUE in glGetCompressedTextureImage(target = GL_TEXTURE_2D, texture = 103384, zoffset = 1)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureSubImage(out of bounds access: bufSize (1) is too small)
Mesa: User error: GL_INVALID_OPERATION in glGetCompressedTextureImage(out of bounds access: bufSize (1) is too small)

Output of the bad:

Mesa: User error: GL_INVALID_OPERATION in glGetTextureParameterfv(texture = 1)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureParameterIiv(texture = 1)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureParameterIuiv(texture = 1)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureParameteriv(texture = 1)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureParameterfv(target)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureParameterIiv(target)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureParameterIuiv(target)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureParameteriv(target)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureSubImage(texture = 103384)
Mesa: User error: GL_INVALID_OPERATION in glGetCompressedTextureImage(texture = 103384)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureSubImage(buffer/multisample texture)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(xoffset = -1)
Mesa: User error: GL_INVALID_VALUE in glGetCompressedTextureImage(xoffset = -1)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(xoffset 2 + width 4 > 2)
Mesa: User error: GL_INVALID_VALUE in glGetCompressedTextureImage(xoffset 4 + width 8 > 4)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(target = GL_TEXTURE_1D, texture = 103378, yoffset = 1)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(target = GL_TEXTURE_2D, texture = 103380, zoffset = 1)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(target = GL_TEXTURE_RECTANGLE, texture = 103381, zoffset = 1)
Mesa: User error: GL_INVALID_VALUE in glGetTextureSubImage(target = GL_TEXTURE_2D, texture = 103382, zoffset = 1)
Mesa: User error: GL_INVALID_OPERATION in glGetCompressedTextureImage(texture = 103384)
Mesa: User error: GL_INVALID_OPERATION in glGetTextureSubImage(out of bounds access: bufSize (1) is too small)
Mesa: User error: GL_INVALID_OPERATION in glGetCompressedTextureImage(out of bounds access: bufSize (1) is too small)

The 'GL_INVALID_OPERATION in glGetCompressedTextureImage(texture = 103384)' message is from _mesa_lookup_texture_err when it can't find a texture object with the nae 103384.

I notice that some of the texture IDs do not match between the two runs and some of the texture targets do not match.  While it's possible that the test is nondeterministic (picking a random texture target based one the drawable config or something), I doubt it.
Comment 5 Ian Romanick 2017-12-15 01:51:36 UTC
This appears to be a bug in the CTS.  I have submitted an issue and a fix to Khronos.  If this turns out to not be the case, I'll reopen this bug.


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.