Bug 103966 - Mesa 17.2.5 implementation error: bad format MESA_FORMAT_Z_FLOAT32 in _mesa_unpack_uint_24_8_depth_stencil_row
Summary: Mesa 17.2.5 implementation error: bad format MESA_FORMAT_Z_FLOAT32 in _mesa_u...
Status: RESOLVED DUPLICATE of bug 94739
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: 17.2
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-29 03:00 UTC by Sebastian Schulz
Modified: 2017-12-07 04:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Sebastian Schulz 2017-11-29 03:00:47 UTC
When trying to create an OpenGL framebuffer with 32bit float depth buffer (using globjects/glbinding as OpenGL lib), I get the following console output:

Mesa 17.2.5 implementation error: bad format MESA_FORMAT_Z_FLOAT32 in _mesa_unpack_uint_24_8_depth_stencil_row
Please report at https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa

Also, the resulting framebuffer doesn't work.

I also tested the code on Windows 10 (with an Nvidia GPU), where the code works without problems.

I made a minimal (not) working example that you can find here: https://github.com/blblblu/mesa-error-test

Am I trying something wrong in OpenGL, or is this a problem with Mesa?

CPU: Intel i5-6200U
GPU: Intel HD Graphics 520 (Skylake GT2)

Thanks
Comment 1 Tapani Pälli 2017-11-30 12:48:02 UTC
Took a quick look, this might be a bug in our glClearTexImage. If you give it the internal format GL_DEPTH_COMPONENT32F then it will work. But IIUC it should accept GL_DEPTH_COMPONENT as format as you have written (no matter what is the internal format used).
Comment 2 Kenneth Graunke 2017-11-30 15:37:58 UTC
Hello,

There's an existing bug about this:
https://bugs.freedesktop.org/show_bug.cgi?id=94739

I wrote a patch for it a few months ago:
https://bugs.freedesktop.org/attachment.cgi?id=130338

Can you try that and see if that helps?  The original reporter wasn't able to tell me whether it worked or not.  It looks like later on Mika determined that it did, and I missed that.  I'll submit the patch shortly...
Comment 3 Kenneth Graunke 2017-11-30 17:54:06 UTC
Slightly better patch here:

https://patchwork.freedesktop.org/patch/191261/
Comment 4 Sebastian Schulz 2017-12-04 13:37:59 UTC
Sorry for the late reply, it now works using the second patch you referred to.
Thank you very much!
Comment 5 Kenneth Graunke 2017-12-07 04:37:35 UTC

*** This bug has been marked as a duplicate of bug 94739 ***
Comment 6 Kenneth Graunke 2017-12-07 04:37:48 UTC
Thanks for testing!  Fix should land shortly...


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.