Bug 30102 - glean depthStencil test fails BadLength with indirect non-swrast rendering
glean depthStencil test fails BadLength with indirect non-swrast rendering
Status: NEW
Product: Mesa
Classification: Unclassified
Component: GLX
git
Other All
: medium normal
Assigned To: mesa-dev
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-09 06:04 UTC by Jon TURNEY
Modified: 2010-09-09 06:22 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Have __glImageSize handle format GL_DEPTH_STENCIL_NV the same way as the server does (932 bytes, patch)
2010-09-09 06:13 UTC, Jon TURNEY
Details | Splinter Review
Synchronize mesa src/glx/compsize with Xserver glx/rensize.c (833 bytes, patch)
2010-09-09 06:16 UTC, Jon TURNEY
Details | Splinter Review
Synchronize Xserver glx/rensize.c with mesa src/glx/compsize.c (784 bytes, patch)
2010-09-09 06:22 UTC, Jon TURNEY
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jon TURNEY 2010-09-09 06:04:52 UTC
$ LIBGL_ALWAYS_INDIRECT=1 ./glean -r results -o --quick -t depthStencil
X Error of failed request:  BadLength (poly request too large or internal Xlib length error)
  Major opcode of failed request:  148 (GLX)
  Minor opcode of failed request:  1 (X_GLXRender)
  Serial number of failed request:  26
  Current serial number in output stream:  27

Note that depthStencil requires GL_EXT_packed_depth_stencil, so this test does nothing against swrast and no failure is seen.
Comment 1 Jon TURNEY 2010-09-09 06:13:16 UTC
Created attachment 38578 [details] [review]
Have __glImageSize handle format GL_DEPTH_STENCIL_NV the same way as the server does

This failure occurs when testing that glDrawPixels with format GL_DEPTH_STENCIL_EXT generates an GL_INVALID_ENUM.

It appears that there is a mismatch between the client and server over the size of the image data in the GLX request: X server glx/rensize.c handles GL_DEPTH_STENCIL(|_NV|_EXT), whereas mesa GLX src/glx/compsize.c ignores it and returns an image size of 0.

Attached patch to mesa resolves that mismatch, allowing the test to successfully execute.
Comment 2 Jon TURNEY 2010-09-09 06:16:17 UTC
Created attachment 38579 [details] [review]
Synchronize mesa src/glx/compsize with Xserver glx/rensize.c

Comparing the client and server code for calculating image size, there are actually a few mismatches.  Assuming that these are errors, and there's not some deeper technical reason for them to be different, here is a patch to synchronize them.
Comment 3 Jon TURNEY 2010-09-09 06:22:07 UTC
Created attachment 38580 [details] [review]
Synchronize Xserver glx/rensize.c with mesa src/glx/compsize.c