Bug 38145

Summary: r600g/evergreen: Incorrect rendering of some effects in doom3
Product: Mesa Reporter: Vadim Girlin <ptpzz>
Component: Drivers/Gallium/r600Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: sa
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
i915 platform: i915 features:
Attachments: screenshot of fire rendering
output from running with "R600_DUMP_SHADERS=true"
add support for multiwrites on eg+
testcase (for piglit vpfp-generic test)

Description Vadim Girlin 2011-06-10 03:05:01 UTC
Created attachment 47801 [details]
screenshot of fire rendering

Some doom3 effects like slightly warped objects behind the fire and glass windows aren't rendered correctly on evergreen with r600g (high quality effects should be enabled in the game settings to reproduce). It was not very noticeable before the commit d1b8f8e8b3b41ab6092fa3f18a4891a0198f64de "r600g: don't lookup a vs semantic for position/face", but after that commit it is much more visible.
Comment 1 Vadim Girlin 2011-06-10 03:06:00 UTC
Created attachment 47802 [details] [review]
output from running with "R600_DUMP_SHADERS=true"
Comment 2 Alex Deucher 2011-06-10 08:15:39 UTC
evergreen+ asics don't support FS_COLOR0_WRITES_ALL_CBUFS yet.  It needs to be emulated in the shader rather than set as state.
Comment 3 Alex Deucher 2011-06-10 12:17:37 UTC
Created attachment 47824 [details] [review]
add support for multiwrites on eg+

Does this patch fix the issue?
Comment 4 Vadim Girlin 2011-06-10 13:47:09 UTC
(In reply to comment #3)
> Created an attachment (id=47824) [details]
> add support for multiwrites on eg+
> Does this patch fix the issue?

No, rendering of the effects is not changed with that patch. The only change afaics is the huge performance drop (2-8x) even in the game menu.
Comment 5 Vadim Girlin 2011-06-10 15:10:48 UTC
BTW, If you don't have the game then there is linux doom3 demo (460mb) available to download from idsoftware ftp site - ftp://ftp.idsoftware.com/idstuff/doom3/linux/doom3-linux-1.1.1286-demo.x86.run -but it was very slow download when i tried it, so you would probably want to find it somewhere else to download faster. This issue is reproducible with the demo too. 

Also, I don't know if it would help, but IIRR there were shader sources with descriptive filenames and comments somewhere in the pk4 data files (probably pak000.pk4 in the full game, and in the demo there is only one pk4 file. pk4 files are zip archives).
Comment 6 Vadim Girlin 2011-06-12 19:55:44 UTC
Created attachment 47878 [details]
testcase (for piglit vpfp-generic test)
Comment 7 Vadim Girlin 2011-06-12 20:02:27 UTC
Created attachment 47879 [details] [review]

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.