|Summary:||Mesa 17.2.5 implementation error: bad format MESA_FORMAT_Z_FLOAT32 in _mesa_unpack_uint_24_8_depth_stencil_row|
|Product:||Mesa||Reporter:||Sebastian Schulz <sebastian.schulz95>|
|Component:||Drivers/DRI/i965||Assignee:||Intel 3D Bugs Mailing List <intel-3d-bugs>|
|Status:||RESOLVED DUPLICATE||QA Contact:||Intel 3D Bugs Mailing List <intel-3d-bugs>|
|i915 platform:||i915 features:|
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...