Bug 88717

Summary: [r300g] r300compiler error: Failed to translate rgb instruction - while running a game with gallium-nine
Product: Mesa Reporter: Fabio Pedretti <pedretti.fabio>
Component: Drivers/Gallium/r300Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED MOVED QA Contact: Default DRI bug account <dri-devel>
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
URL: https://github.com/iXit/Mesa-3D/issues/64
Whiteboard:
i915 platform: i915 features:
Attachments: console output running with RADEON_DEBUG=fp
Possible fix
screenshot with patch
"RADEON_DEBUG=fp,vp,pstat sauerbraten -lforce" output
"RADEON_DEBUG=fp,vp,pstat sauerbraten -lforce" output WITH patch -> b/n textures
0ad main menu console output
0ad main menu console output + PATCH -> grey menu texture corruption

Description Fabio Pedretti 2015-01-22 18:42:47 UTC
When running Tales of Monkey Island game with quality >= 7/9 using iXit mesa master branch I get the following error:

r300compiler error: Failed to translate rgb instruction.
r300 FP: Compiler Error:
Failed to translate rgb instruction.
Using a dummy shader instead.
r300: Initial fragment program

If useful I attached the output when running with "RADEON_DEBUG=fp wine MonkeyIsland101.exe > ~/nine-tales-monkey-island.txt 2>&1".

According to axeldavy on the gallium-nine github issue tracker ( https://github.com/iXit/Mesa-3D/issues/64 ) the shader seems fine, it is likely a r300 compiler error.
Comment 1 Fabio Pedretti 2015-01-22 18:46:54 UTC
Created attachment 112679 [details]
console output running with RADEON_DEBUG=fp

I have a Radeon RV530.
Comment 2 Tom Stellard 2015-01-22 21:12:06 UTC
Created attachment 112689 [details] [review]
Possible fix

Can you try this patch?
Comment 3 Fabio Pedretti 2015-01-23 12:23:26 UTC
Created attachment 112717 [details]
screenshot with patch

The patch fixes the error, thanks.

The rendering is also improved but not correct however, while before the patch I got a black screen now I get the attached blurred image.

Running nine with D3D_ALWAYS_SOFTWARE=1 shows a proper render.
Comment 4 Fabio Pedretti 2015-01-23 14:13:46 UTC
The patch also regresses other games with different corruption types (e.g. sauerbraten becomes in black/white, 0ad has flickering textures).
Comment 5 Tom Stellard 2015-01-27 20:26:35 UTC
Can you send me before/after dumps of RADEON_DEBUG=fs,vs,ps from one of the regressed games?
Comment 6 Fabio Pedretti 2015-01-29 12:14:56 UTC
Created attachment 112936 [details]
"RADEON_DEBUG=fp,vp,pstat sauerbraten -lforce" output

(In reply to Tom Stellard from comment #5)
> Can you send me before/after dumps of RADEON_DEBUG=fs,vs,ps from one of the
> regressed games?

I tried it with "RADEON_DEBUG=fp,vp,pstat" since "fs,vs,ps" apparently are not available. I tried running "sauerbraten -lforce" which shows black/white textures.

Note: it looks the output changes between consecutive runs, although there are not many possibilities (an output repeat after some runs). I attach the outputs before and after the patch that should hopefully match to the same game combination.
Comment 7 Fabio Pedretti 2015-01-29 12:16:09 UTC
Created attachment 112937 [details]
"RADEON_DEBUG=fp,vp,pstat sauerbraten -lforce" output WITH patch -> b/n textures
Comment 8 Fabio Pedretti 2015-01-30 16:49:36 UTC
Created attachment 112981 [details]
0ad main menu console output

Here is another simple testcase, this is just the 0ad main menu, with the patch I can see a corrupted menu (a menu texture is grey).
Comment 9 Fabio Pedretti 2015-01-30 16:50:18 UTC
Created attachment 112982 [details]
0ad main menu console output + PATCH -> grey menu texture corruption
Comment 10 Fabio Pedretti 2015-02-20 17:17:46 UTC
Tom, any news on this? Thanks!
Comment 11 GitLab Migration User 2019-09-18 18:52:59 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/366.

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.