Bug 30167 - Heroes of Newerth: Setting shader quality to medium results in corrupt rendering
Summary: Heroes of Newerth: Setting shader quality to medium results in corrupt rendering
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r300 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL: http://www.heroesofnewerth.com/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-13 10:48 UTC by Sven Arvidsson
Modified: 2013-02-26 12:31 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Screenshot on medium setting (134.39 KB, image/jpeg)
2010-09-13 10:48 UTC, Sven Arvidsson
Details
Screenshot on high (142.90 KB, image/jpeg)
2010-09-13 10:48 UTC, Sven Arvidsson
Details
RADEON_DEBUG=noopt,fp,vp log (211.93 KB, application/x-gzip)
2010-09-24 07:34 UTC, Sven Arvidsson
Details
Screenshot with noopt - settings on medium (191.01 KB, image/jpeg)
2010-09-24 07:35 UTC, Sven Arvidsson
Details
Possible fix (810 bytes, patch)
2010-09-30 00:38 UTC, Tom Stellard
Details | Splinter Review
RADEON_DEBUG=fp with medium settings (106.63 KB, application/x-gzip)
2010-09-30 12:00 UTC, Sven Arvidsson
Details
RADEON_DEBUG=fp with high settings (200.61 KB, application/x-gzip)
2010-09-30 12:00 UTC, Sven Arvidsson
Details

Description Sven Arvidsson 2010-09-13 10:48:20 UTC
Created attachment 38673 [details]
Screenshot on medium setting

In the game Heroes of Newerth, turning the setting "Shader Quality" to medium or high results in corrupt rendering of water.

This seems to be a regression from the glsl2 merge, but it seems fine on llvmpipe, so I'm guessing the bug is specific to r300g.

I _think_ it's possible to reproduce this bug without buying the game, by only registering and then either starting a practice game or running the tutorial. If not, I'll see about getting some trial invites. 

The rest of the effects in the game seems to be working fine.

System environment:
-- system architecture: 32-bit
-- Linux distribution: Debian unstable
-- GPU: RV570
-- Model: Asus EAX1950Pro 256MB
-- Display connector: DVI
-- xf86-video-ati: e9928fe036e9382fd7bc353f3f05531445f08977
-- xserver: 1.8.99.904 (1.9.0 RC 5)
-- mesa: 6f839eb631511925505093be4d0509ac14f5675b
-- drm: 23287f05cf2443ddf9e028e29beb5bd30979c6cf
-- kernel: 2.6.35.4
Comment 1 Sven Arvidsson 2010-09-13 10:48:43 UTC
Created attachment 38674 [details]
Screenshot on high
Comment 2 Tom Stellard 2010-09-23 15:55:06 UTC
Can you try it again with RADEON_DEBUG=noopt.  If this fixes it, can you post the output with RADEON_DEBUG=noopt,fp,vp _and_ RADEON_DEBUG=fp,vp.  If this doesn't fix it, can you post the output with RADEON_DEBUG=noopt,fp,vp
Comment 3 Sven Arvidsson 2010-09-24 07:34:40 UTC
Created attachment 38934 [details]
RADEON_DEBUG=noopt,fp,vp log

(In reply to comment #2)
> Can you try it again with RADEON_DEBUG=noopt.  If this fixes it, can you post
> the output with RADEON_DEBUG=noopt,fp,vp _and_ RADEON_DEBUG=fp,vp.  If this
> doesn't fix it, can you post the output with RADEON_DEBUG=noopt,fp,vp

Hmm... I get a different result with noopt, the corruption is less noticeable, mostly in the borders around the water, but the actual visual effect seems to be missing. 

I'm attaching a log with RADEON_DEBUG=noopt,fp,vp
Comment 4 Sven Arvidsson 2010-09-24 07:35:44 UTC
Created attachment 38935 [details]
Screenshot with noopt - settings on medium
Comment 5 Tom Stellard 2010-09-25 22:47:12 UTC
Does running with RADEON_DEBUG=noopt and RADEON_NO_TCL=1 help?
Comment 6 Sven Arvidsson 2010-09-26 10:48:21 UTC
(In reply to comment #5)
> Does running with RADEON_DEBUG=noopt and RADEON_NO_TCL=1 help?

No difference with or without setting RADEON_NO_TCL as far as I can see.
Comment 7 Tom Stellard 2010-09-30 00:38:02 UTC
Created attachment 39059 [details] [review]
Possible fix

Does this patch make any difference?
Comment 8 Sven Arvidsson 2010-09-30 07:20:16 UTC
(In reply to comment #7)
> Created an attachment (id=39059) [details]
> Possible fix
> 
> Does this patch make any difference?

This patch with noopt seems to be the best result yet.

I made a bunch of screenshots, comparing llvmpipe with master, master+noopt, the patch, and the patch+noopt: http://www.flickr.com/photos/whizse/
Comment 9 Tom Stellard 2010-09-30 08:05:38 UTC
(In reply to comment #8)
> 
> I made a bunch of screenshots, comparing llvmpipe with master, master+noopt,
> the patch, and the patch+noopt: http://www.flickr.com/photos/whizse/

Thanks, this was helpful.  Can you post the output of RADEON_DEBUG=fp on master with both medium and high settings.

Also, is there any chance that this is a regression that can be bisected?
Comment 10 Sven Arvidsson 2010-09-30 12:00:19 UTC
Created attachment 39078 [details]
RADEON_DEBUG=fp with medium settings
Comment 11 Sven Arvidsson 2010-09-30 12:00:58 UTC
Created attachment 39079 [details]
RADEON_DEBUG=fp with high settings
Comment 12 Sven Arvidsson 2010-09-30 12:02:56 UTC
(In reply to comment #9)
> Thanks, this was helpful.  Can you post the output of RADEON_DEBUG=fp on master
> with both medium and high settings.

Done

> Also, is there any chance that this is a regression that can be bisected?

The regression happened right after the glsl2 merge. I don't think it's possible to pinpoint it down any further.
Comment 13 Tom Stellard 2010-10-28 00:00:34 UTC
Can you try this again with the latest version of mesa from git?
Comment 14 Sven Arvidsson 2010-10-28 12:11:11 UTC
(In reply to comment #13)
> Can you try this again with the latest version of mesa from git?

No change I'm afraid.
Comment 15 Tom Stellard 2010-11-21 21:54:22 UTC
Can you try this again with the latest git master?
Comment 16 Sven Arvidsson 2010-11-23 07:31:49 UTC
(In reply to comment #15)
> Can you try this again with the latest git master?

The problem remains (corrupt rendering with medium and high) but seems to be slightly different now. I have uploaded new screenshots:

high:
http://www.flickr.com/photos/whizse/5201781578/

medium:
http://www.flickr.com/photos/whizse/5201187031/

all previous screenshots are here, for comparison:
http://www.flickr.com/photos/whizse/

I also noticed this error message:
 r300: ERROR: FS input generic 17 unassigned, not enough hardware slots.

Let me know if you need new debug dumps or screenshots with noopt.
Comment 17 Marek Olšák 2010-12-17 04:35:51 UTC
Is this still an issue with current Mesa master?
Comment 18 Pavel Ondračka 2010-12-17 04:56:31 UTC
(In reply to comment #17)
> Is this still an issue with current Mesa master?

Yes, this is still an issue with the latest Mesa master.
Comment 19 Sven Arvidsson 2011-02-11 10:10:07 UTC
Just retried this, no change with git master 6ed0f2ac112d22278cf051c2cee9c2199a9025ea
Comment 20 Sven Arvidsson 2011-02-22 13:36:53 UTC
(In reply to comment #16)
> I also noticed this error message:
>  r300: ERROR: FS input generic 17 unassigned, not enough hardware slots.
> 

Since this error now reports that this isn't a bug, is there any point in keeping this bug open?
Comment 21 Marek Olšák 2011-02-22 22:02:32 UTC
I don't think so. We can't fix the error, we can only suppress printing it. If there is any issue unrelated to the error, let's keep this report open (is there any?), otherwise I'd close it.
Comment 22 Sven Arvidsson 2011-02-23 05:42:54 UTC
(In reply to comment #21)
> I don't think so. We can't fix the error, we can only suppress printing it. If
> there is any issue unrelated to the error, let's keep this report open (is
> there any?), otherwise I'd close it.

There's still a problem with rendering issues when shader quality is set to anything higher than "Low". I was just wondering if this is related to the hardware limitation (the "FS input generic 17 unassigned" warning) rather than bug?
Comment 23 Marek Olšák 2011-02-23 06:34:31 UTC
It could be. That FS input may contain random values because it's uninitialized, potentially leading to pixels being influenced by it, resulting in sort of random corruption. It depends on the shader and how much the input contributes to the final pixel color.
Comment 24 Pavel Ondračka 2013-02-08 12:59:27 UTC
This seems to be fixed in the latest mesa git, however I didn't test all the different settings mentioned in Comment 16. Sven can you confirm this is indeed fixed?
Comment 25 Sven Arvidsson 2013-02-25 16:01:20 UTC
(In reply to comment #24)
> This seems to be fixed in the latest mesa git, however I didn't test all the
> different settings mentioned in Comment 16. Sven can you confirm this is
> indeed fixed?

I will probably not have time to test this in the foreseeable future, so unless someone else can, I don't mind if the bug is closed.


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.