https://bugs.freedesktop.org/show_bug.cgi?id=33762
Summary: Framebuffer Depth textures (Shadow mapping) - FBO-EXT Product: Mesa Version: git Platform: x86-64 (AMD64) OS/Version: Linux (All) Status: NEW Severity: normal Priority: medium Component: Drivers/DRI/R600 AssignedTo: dri-devel@lists.freedesktop.org ReportedBy: s3734770@mail.zih.tu-dresden.de
I'm running a depth map demo that uses fbo depth maps as a render target. The fbo (EXT) is filled with static stuff (like a mask that is moved over the screen). So the contents i drawed into the buffer (the depth component is bound to the buffer) are ignored
I don't know if this feature is in progress or if you know what is missing in the driver. If you have no clue, I can offer the following things after a request: - Pics of the artifacts - Videos that show that the depth texture is not updated - Explanation how i set up the FBO/Renderbuffer
The thing works with fglrx.
Extensions I used: Framebuffer_EXT Renderbuffer_EXT (for depth store)
https://bugs.freedesktop.org/show_bug.cgi?id=33762
--- Comment #1 from s3734770@mail.zih.tu-dresden.de 2011-01-31 07:40:14 PST --- Here the code:
glGenFramebuffersEXT(1, @fb); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fb); glGenRenderbuffersEXT(1, @render_buf); glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, render_buf); glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, ShadowSize, ShadowSize); glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, render_buf);
https://bugs.freedesktop.org/show_bug.cgi?id=33762
--- Comment #2 from Alex Deucher agd5f@yahoo.com 2011-01-31 07:47:56 PST --- You'll probably have more luck with the r600 gallium driver (r600g).
https://bugs.freedesktop.org/show_bug.cgi?id=33762
--- Comment #3 from s3734770@mail.zih.tu-dresden.de 2011-01-31 08:38:58 PST --- Oh I forgot: Driver is of course r600g.
https://bugs.freedesktop.org/show_bug.cgi?id=33762
s3734770@mail.zih.tu-dresden.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|Drivers/DRI/R600 |Drivers/Gallium/r600
https://bugs.freedesktop.org/show_bug.cgi?id=33762
--- Comment #4 from s3734770@mail.zih.tu-dresden.de 2011-01-31 09:41:12 PST --- i found a demo that reproduces the bug for me:
http://cgit.freedesktop.org/mesa/demos/ in /demos/shadowtex
in all programs the texture looks the same. i attached a pic how the demo looks like. watch the shadow
https://bugs.freedesktop.org/show_bug.cgi?id=33762
--- Comment #5 from s3734770@mail.zih.tu-dresden.de 2011-01-31 09:42:17 PST --- Created an attachment (id=42761) --> (https://bugs.freedesktop.org/attachment.cgi?id=42761) shadow map
https://bugs.freedesktop.org/show_bug.cgi?id=33762
--- Comment #6 from s3734770@mail.zih.tu-dresden.de 2011-01-31 12:04:55 PST --- The following hint is given in the docs:
6.3 CB 6.3.1 DB->CB Copies: RV6xx In RV610, RV630, RV620, and RV635 but not R600, RV670, or RS780, the DB->CB copies needs the following programming sequence to ensure the DB will read the Z/Stencil data. 1. Z_ENABLE = true 2. STENCIL_ENABLE = true 3. Z_WRITE_ENABLE = false 4. STENCILWRITEMASK = 0xff 5. Z vertices = 0.0. (like a Z clear to 0.0) 6. ZFUNC= LEQUAL 7. STENCILFUNC = REF_ALWAYS 8. STENCILZPASS = STENCIL_KEEP 9. STENCILZFAIL = STENCIL_INCR_CLAMP 10. DB_RENDER_OVERRIDE.FORCE_HIZ_ENABLE = FORCE_DISABLE
It seems to be a RV6xx specific problem. I hope, you can fix it.
https://bugs.freedesktop.org/show_bug.cgi?id=33762
--- Comment #7 from Henri Verbeet hverbeet@gmail.com 2011-01-31 16:25:18 PST --- Probably fixed by d171ae086bae37279251a1d6f32e16e333cfc154, shadowtex is at least.
https://bugs.freedesktop.org/show_bug.cgi?id=33762
--- Comment #8 from s3734770@mail.zih.tu-dresden.de 2011-01-31 23:45:44 PST --- the latest changes (between 11bc8991e94e2fa6d461193a6aff47f8f94b7a47 and 5e19b5ad16b2761fe9d8877318f2fc97b229335c) broke the driver. I can use 2D menus with OGL and glxgears works but when I start using the 3D part (uses FBO, shaders and vertex buffers), the image freezes and I cannot stop my prog.
https://bugs.freedesktop.org/show_bug.cgi?id=33762
--- Comment #9 from Dave Airlie airlied@freedesktop.org 2011-02-01 00:05:36 PST --- does reverting
11bc8991e94e2fa6d461193a6aff47f8f94b7a47
fix it?
https://bugs.freedesktop.org/show_bug.cgi?id=33762
--- Comment #10 from s3734770@mail.zih.tu-dresden.de 2011-02-01 00:15:31 PST --- Git bisect blamed 14880a510a1a288df0778395097d5a52806abfb0, there are strange things happening. The framerate drops downto 3 FPS and the texture bug appears again.
I also created a patch inspired from glisse that fixes the bug (but is maybe not the correct solution because the tiling management is still unfinished)
https://bugs.freedesktop.org/show_bug.cgi?id=33762
--- Comment #11 from s3734770@mail.zih.tu-dresden.de 2011-02-01 00:16:03 PST --- (In reply to comment #9)
does reverting
11bc8991e94e2fa6d461193a6aff47f8f94b7a47
fix it?
no
https://bugs.freedesktop.org/show_bug.cgi?id=33762
--- Comment #12 from s3734770@mail.zih.tu-dresden.de 2011-02-01 00:19:08 PST --- Created an attachment (id=42797) View: https://bugs.freedesktop.org/attachment.cgi?id=42797 Review: https://bugs.freedesktop.org/review?bug=33762&attachment=42797
Patch that fixes the depth map copying (but not the freeze)
This patch is inspired by Jerome Glisse This patch does not solve the problem that the screen is freezing
https://bugs.freedesktop.org/show_bug.cgi?id=33762
--- Comment #13 from s3734770@mail.zih.tu-dresden.de 2011-02-01 00:23:53 PST --- When I revert 14880a510a1a288df0778395097d5a52806abfb0, i can play with working depth textures and 3 FPS.
https://bugs.freedesktop.org/show_bug.cgi?id=33762
--- Comment #14 from s3734770@mail.zih.tu-dresden.de 2011-02-01 00:26:09 PST --- Ah, as I see the original problem is fixed in git but the glsl compiler had a deadlock so that I cannot test it.
https://bugs.freedesktop.org/show_bug.cgi?id=33762
s3734770@mail.zih.tu-dresden.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #15 from s3734770@mail.zih.tu-dresden.de 2011-04-07 01:20:28 PDT --- resolved long time ago
dri-devel@lists.freedesktop.org