Bug 26123 - Rendering to offscreen depth-texture fails
Summary: Rendering to offscreen depth-texture fails
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL: http://fabiensanglard.net/shadowmappi...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-19 15:20 UTC by Pavel Rojtberg
Modified: 2010-09-14 15:21 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
rendering errors with shadowmap (12.17 KB, image/png)
2010-03-20 04:08 UTC, Pavel Rojtberg
Details
Failed shadowmap CS (15.44 KB, text/plain)
2010-03-26 06:12 UTC, Corbin Simpson
Details

Description Pavel Rojtberg 2010-01-19 15:20:05 UTC
driver: r300g, latest git on ubuntu lucid. (Kernel 2.6.32)

when executing the linked demo, the shadowmap is being misrendered and on the console there is a lot of vomit in the style of:

Pkt3 at 306 :
    PACKET3_3D_LOAD_VBPNTR:
        0x00000001
        0x00000603
        0x000004B0
Pkt3 at 310 :
    PACKET3_NOP:
        0x00000004
Pkt0 at 312 (1 dwords):
    0x0003AAAA -> 0x4278
Pkt0 at 314 (1 dwords):
    0x00000000 -> 0x2138
Pkt0 at 316 (1 dwords):
    0x00000017 -> 0x2134
Pkt3 at 318 :
    PACKET3_3D_DRAW_VBUF_2:
        0x0018002D
...

If I change the code and add a COLOR_ATTACHMENT texture to the FBO the vomit goes away, but the shadowmap is still misrendered.
Comment 1 Corbin Simpson 2010-03-19 16:36:57 UTC
Try again with current git?
Comment 2 Pavel Rojtberg 2010-03-20 04:08:55 UTC
Created attachment 34252 [details]
rendering errors with shadowmap
Comment 3 Pavel Rojtberg 2010-03-20 04:09:24 UTC
the vomit went away when the drm in lucid was updated to 2.6.33. With the current mesa git the shadowmap is rendered correctly, but the final picture is still misrendered. (see screenshot)
Comment 4 Corbin Simpson 2010-03-26 06:12:55 UTC
Created attachment 34478 [details]
Failed shadowmap CS
Comment 5 Marek Olšák 2010-04-11 19:55:17 UTC
The demo more or less works here with latest kernel and libdrm (2.6.32 is too old), but I think Mesa doesn't like the way shadow samplers are used here as it fails with gallium/softpipe too. I am changing the component to Mesa core.

In the meantime, please use the sampler type sampler2DShadow and the fetching function shadow2D. That should work.
Comment 6 Marek Olšák 2010-09-14 11:26:01 UTC
Pavel, could you please test latest Mesa master?
Comment 7 Pavel Rojtberg 2010-09-14 15:21:47 UTC
works fine now. mesa git on Ubuntu Maverick.


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.