Bug 90439

Summary: [LLVM] Xonotic render green (bisected)
Product: Mesa Reporter: smoki <smoki00790>
Component: Drivers/Gallium/radeonsiAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact: Default DRI bug account <dri-devel>
Severity: critical    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Good
Bad
piglit-good
piglit-bad
pass
fail
Make sure v_interp_p1_f32 doesn't use the source register as destination

Description smoki 2015-05-13 18:17:29 UTC
Created attachment 115745 [details]
Good

llvm r237140 bisected where Xonotic start to render mostly green artifacts on textures.

 Attached R600_DEBUG=ps,vs,gs outputs from good on llvm r237139
Comment 1 smoki 2015-05-13 18:18:32 UTC
Created attachment 115747 [details]
Bad


 And bad with llvm r237140
Comment 2 smoki 2015-05-13 18:21:23 UTC
 mesa is 58715b72396133350c1549381553121f936a198e, kernel 4.1-rc3, hardware Athlon 5350 (Kabini), etc...
Comment 3 Michel Dänzer 2015-05-14 02:16:36 UTC
You said on IRC that the same commit also broke some piglit tests. If so, please attach the good and bad R600_DEBUG=ps,vs,gs output for one of those.
Comment 4 smoki 2015-05-14 09:31:17 UTC
Created attachment 115763 [details]
piglit-good

 Yes, example output is from:

 R600_DEBUG=ps,vs,gs ./bin/copy-pixels -samples=8 -auto

 on r237139
Comment 5 smoki 2015-05-14 09:32:33 UTC
Created attachment 115764 [details]
piglit-bad

 and bad with r237140
Comment 6 smoki 2015-05-14 11:01:37 UTC
 Uploaded piglit comparison within these llvm commits

https://dl.dropboxusercontent.com/u/74553632/bug90439.tar.bz2

 So basicaly the same ~130 piglits fail, just like in bug 89034 if i enable sub-reg liveness.
Comment 7 Tom Stellard 2015-05-22 00:52:25 UTC
Could you get good and bad dumps from the glsl-fs-abs-03 test ?
Comment 8 smoki 2015-05-22 02:30:52 UTC
Created attachment 115962 [details]
pass

 Hi Tom, good and bad diff taken from glsl-fs-abs-03 test.
 
121,125c121,125
< 	v_interp_p1_f32 v4, v0, 2, 0, [m0]       ; C8100200
< 	v_interp_p2_f32 v4, [v4], v1, 2, 0, [m0] ; C8110201
< 	v_cvt_pkrtz_f16_f32_e64 v0, |v2|, |v3|   ; D25E0300 00020702
< 	v_cvt_pkrtz_f16_f32_e64 v1, |v4|, 1.0    ; D25E0101 0001E504
< 	exp 15, 0, 1, 1, 1, v0, v1, v0, v1       ; F8001C0F 01000100
---
> 	v_interp_p1_f32 v0, v0, 2, 0, [m0]       ; C8000200
> 	v_interp_p2_f32 v0, [v0], v1, 2, 0, [m0] ; C8010201
> 	v_cvt_pkrtz_f16_f32_e64 v1, |v2|, |v3|   ; D25E0301 00020702
> 	v_cvt_pkrtz_f16_f32_e64 v0, |v0|, 1.0    ; D25E0100 0001E500
> 	exp 15, 0, 1, 1, 1, v1, v0, v1, v0       ; F8001C0F 00010001
130c130
< VGPRS: 8
---
> VGPRS: 4
Comment 9 smoki 2015-05-22 02:32:49 UTC
Created attachment 115963 [details]
fail


 fail on svn237140 attachment
Comment 10 Michel Dänzer 2015-05-22 02:59:48 UTC
Created attachment 115965 [details] [review]
Make sure v_interp_p1_f32 doesn't use the source register as destination

Does this proof-of-concept LLVM patch fix the problem?
Comment 11 smoki 2015-05-22 06:22:39 UTC
(In reply to Michel Dänzer from comment #10)
> Created attachment 115965 [details] [review] [review]
> Make sure v_interp_p1_f32 doesn't use the source register as destination
> 
> Does this proof-of-concept LLVM patch fix the problem?

 Bingo! That seems fixed everyting.

 On top of that also i can enable SubRegLiveness without a problem.
Comment 12 Tom Stellard 2015-05-22 18:15:14 UTC
Can you try this branch: http://cgit.freedesktop.org/~tstellar/llvm/log/?h=vinterp-fix
Comment 13 smoki 2015-05-22 22:34:27 UTC
(In reply to Tom Stellard from comment #12)
> Can you try this branch:
> http://cgit.freedesktop.org/~tstellar/llvm/log/?h=vinterp-fix

 Works fine, apps render fine and no piglit regression.

 With that mainlined, this one and bug 89034 can be marked as fixed.
Comment 14 smoki 2015-05-26 00:54:27 UTC
 Patches mainlined. Closing.

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.