Bug 36939 - multitexturing is messed up in quake wars (regression)
multitexturing is messed up in quake wars (regression)
Status: RESOLVED FIXED
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r300
git
Other All
: medium normal
Assigned To: Default DRI bug account
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-07 09:42 UTC by almos
Modified: 2011-09-18 18:03 UTC (History)
0 users

See Also:


Attachments
etqw_console.txt.gz (125.17 KB, application/x-gzip)
2011-05-07 12:24 UTC, almos
Details
Verbose patch (596 bytes, patch)
2011-05-09 22:11 UTC, Tom Stellard
Details | Splinter Review
etqw_log_verbose.txt.gz (174.21 KB, application/x-gzip)
2011-05-10 02:46 UTC, almos
Details
Possible Fix (1.78 KB, patch)
2011-05-10 19:46 UTC, Tom Stellard
Details | Splinter Review
Possible Fix (1.78 KB, patch)
2011-05-10 19:46 UTC, Tom Stellard
Details | Splinter Review
etqw_log.txt.gz (203.27 KB, application/x-gzip)
2011-05-11 03:30 UTC, almos
Details
Fix v2 (1.77 KB, patch)
2011-05-11 09:10 UTC, Tom Stellard
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description almos 2011-05-07 09:42:28 UTC
With some detail levels only the base texture (diffuse) is drawn on the objects, but no light/bump/specular. With 'Shader Effects' set to low the strogg deployables are like this (from any distance), while setting it to high makes every object (except the ground) that are closer than ~10 meters appear like this.

This message is written to the console a couple of times:
Not a native swizzle: 00000e08
Comment 1 Tom Stellard 2011-05-07 11:05:34 UTC
Can you run the program with the environment variable RADEON_DEBUG=fp and post the output.
Comment 2 almos 2011-05-07 12:24:15 UTC
Created attachment 46429 [details]
etqw_console.txt.gz

(In reply to comment #1)
> Can you run the program with the environment variable RADEON_DEBUG=fp and post
> the output.
Attached full log.
Comment 3 Tom Stellard 2011-05-09 22:11:23 UTC
Created attachment 46516 [details] [review]
Verbose patch

This patch will give me some more verbose output, could you apply it to master and post the output with RADEON_DEBUG=fp
Comment 4 almos 2011-05-10 02:46:15 UTC
Created attachment 46526 [details]
etqw_log_verbose.txt.gz

As the previous one, this was also done with shader effects = high.
Comment 5 Tom Stellard 2011-05-10 03:22:00 UTC
(In reply to comment #4)
> Created an attachment (id=46526) [details]
> etqw_log_verbose.txt.gz
> 
> As the previous one, this was also done with shader effects = high.

Thanks.  Running with RADEON_DEBUG=noopt should make the problem go away while I'm working on a fix.
Comment 6 Tom Stellard 2011-05-10 19:46:04 UTC
Created attachment 46577 [details] [review]
Possible Fix

I think this patch might fix this.  If it doesn't could you post the output of RADEON_DEBUG=fp again.
Comment 7 Tom Stellard 2011-05-10 19:46:42 UTC
Created attachment 46579 [details] [review]
Possible Fix

I think this patch might fix this.  If it doesn't could you post the output of RADEON_DEBUG=fp again.
Comment 8 almos 2011-05-11 03:30:14 UTC
Created attachment 46595 [details]
etqw_log.txt.gz

Unfortunately the fix makes things worse. Now everything is black except the sky, the trees and the weapon projectiles.
Comment 9 Tom Stellard 2011-05-11 09:10:56 UTC
Created attachment 46609 [details] [review]
Fix v2

Can you try this patch.  If it doesn't work please post the output of RADEON_DEBUG=fp again.
Comment 10 almos 2011-05-11 11:04:43 UTC
Fix v2 works perfectly. Thanks. I also tested some other games, and saw no regressions.
Comment 11 Tom Stellard 2011-05-11 16:55:50 UTC
Fix in git by commit 95c93651b4023cb070878aee7723d886de8ea19a
Comment 12 almos 2011-08-13 10:33:30 UTC
Now this problem appeared again. With medium shader detail all human deployables and the strogg AVT loose detail textures and lightmaps as approached. With high shader detail the wheels of some vehicles do this as well.
Comment 13 Tom Stellard 2011-08-15 12:12:00 UTC
(In reply to comment #12)
> Now this problem appeared again. With medium shader detail all human
> deployables and the strogg AVT loose detail textures and lightmaps as
> approached. With high shader detail the wheels of some vehicles do this as
> well.

Can you bisect this?
Comment 14 almos 2011-08-20 13:13:19 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > Now this problem appeared again. With medium shader detail all human
> > deployables and the strogg AVT loose detail textures and lightmaps as
> > approached. With high shader detail the wheels of some vehicles do this as
> > well.
> 
> Can you bisect this?

217cd216eac65983004ca77a9e49dbfad1b720b6 is the first bad commit
commit 217cd216eac65983004ca77a9e49dbfad1b720b6
Author: Tom Stellard <tstellar@gmail.com>
Date:   Tue May 17 18:51:20 2011 -0700

    r300/compiler: Fix bug in rc_get_variables()
    
    Variables that write to the same source select need to pe paired
    together otherwise the register allocator might fail.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=36753

:040000 040000 a1d3852986919d6ae3449a06a8b3dc43afe90689 2a8531a9541ae918d70bff7911025fed709e7b6b M	src

I think #40062 is a duplicate of this one.
Comment 15 Tom Stellard 2011-09-18 18:03:19 UTC
Fixed in git commit 2d1004d9aa719bb93a4f057b0eefe88f23b44e44