System Environment: -------------------------- Arch: X86_64 Platform: Ironlake Libdrm: (master)2.4.33-10-gf00efc7ab442f106d3ac7699e80f1f7aee8451f4 Mesa: (master)249fc7056104113633215106ac085b505d8dc161 Libva_intel_driver:(vaapi-ext)82fa52510a37ab645daaa3bb7091ff5096a20d0b Kernel_unstable:(drm-intel-next-queued)0156f0046bb709a8d7c7d48e3e055b3ecf6699c9 Bug detailed description: ----------------------------- It fails on Ironlake,Sandybridge and Ivybridge with mesa master branch.It doesn't happen on mesa 8.0 branch. Following oglc cases also fail with the same commit: shad-compiler(advanced.TestLessThanEquali) shad-compiler(advanced.TestGreaterThan) shad-compiler(advanced.TestGreaterThani) shad-compiler(advanced.TestGreaterThanEqual) shad-compiler(advanced.TestGreaterThanEquali) shad-compiler(advanced.TestEqualb) shad-compiler(advanced.TestNotEqual) shad-compiler(advanced.TestNotEquali) shad-compiler(advanced.TestNotEqualb) Bisect shows:80ecb8f15b9ad7d6edcc85bd19f1867c368b09b6 is the first bad commit. commit 80ecb8f15b9ad7d6edcc85bd19f1867c368b09b6 Author: Eric Anholt <eric@anholt.net> Date: Tue Mar 13 14:19:31 2012 -0700 i965/fs: Avoid generating extra AND instructions on bool logic ops. By making a bool fs_reg only have a defined low bit (matching CMP output), instead of being a full 0 or 1 value, we reduce the ANDs generated in logic chains like: if (v_texcoord.x < 0.0 || v_texcoord.x > texwidth || v_texcoord.y < 0.0 || v_texcoord.y > 1.0) discard; My concern originally when writing this code was that we would end up generating unnecessary ANDs on bool uniforms, so I put the ANDs right at the point of doing the CMPs that otherwise set only the low bit. However, in order to use a bool, we're generating some instruction anyway (e.g. moving it so as to produce a condition code update), and those instructions can often be turned into an AND at that point. It turns out in the shaders I have on hand, none of them regress in instruction count: Total instructions: 262649 -> 262545 39/2148 programs affected (1.8%) 14253 -> 14149 instructions in affected programs (0.7% reduction) Reproduce steps: ---------------------------- 1. start X 2. ./oglconform -z -suite all -v 2 -D 115 -test shad-compiler advanced.TestLessThani
Following cases fail on Ivybridge with mesa master branch, and fail with the same commit. Oglc cases: glsl-type-cast(basic.explicit.intToBool) glsl-type-cast(basic.explicit.uIntToBool) glsl-type-cast(basic.explicit.floatToBool) shad-compiler(advanced.TestLessThan) shad-compiler(advanced.TestLessThanEqual) Bisect shows 80ecb8f15b9ad7d6edcc85bd19f1867c368b09b6 is the first bad commit.
Following cases fail on Ivybridge and Sandybridge with mesa master branch, and fail with the same commit. Oglc cases: glsl-type-cast(basic.explicit.intToBool) glsl-type-cast(basic.explicit.uIntToBool) glsl-type-cast(basic.explicit.floatToBool) shad-compiler(advanced.TestLessThan) shad-compiler(advanced.TestLessThanEqual) Bisect shows 80ecb8f15b9ad7d6edcc85bd19f1867c368b09b6 is the first bad commit.
commit dc42910e98dc00760255cc4579da458de09175b9 Author: Eric Anholt <eric@anholt.net> Date: Mon Apr 23 16:48:09 2012 -0700 i965/fs: Fix regression in comparison handling from ANDs change. I had fixed up the logic ops for delayed ANDing, but not equality comparisons on bools. Fixes new piglit fs-bool-less-compare-true. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48629
Following cases still fail on IVB and SNB. shad-compiler(advanced.TestLessThanEquali) shad-compiler(advanced.TestGreaterThan) shad-compiler(advanced.TestGreaterThani) shad-compiler(advanced.TestGreaterThanEqual) shad-compiler(advanced.TestGreaterThanEquali) shad-compiler(advanced.TestEqualb) shad-compiler(advanced.TestNotEqual) shad-compiler(advanced.TestNotEquali) shad-compiler(advanced.TestNotEqualb) Following cases pass on IVB and SNB. glsl-type-cast(basic.explicit.intToBool) glsl-type-cast(basic.explicit.uIntToBool) glsl-type-cast(basic.explicit.floatToBool) This issue fixed on Ironlake with commit dc42910e98dc0.
I suspect this may have been fixed by the commit below. Lu, can you verify? commit 5b83bdc154ec8d607a4c4d96171d0128e51abaec Author: Kenneth Graunke <kenneth@whitecape.org> Date: Sat Jun 16 02:08:13 2012 -0700 i965: Fix brw_swap_cmod() for LE/GE comparisons. The idea here is to rewrite comparisons like 2 >= x with x <= 2; we want to simply exchange arguments, not negate the condition. If equality was part of the original comparison, it should remain part of the swapped version. This is the true cause of bug #50298. It didn't manifest itself on Sandybridge because we embed the conditional modifier in the IF instruction rather than emitting a CMP. All other platforms use CMP. It also didn't manifest itself on the master branch because commit be5f27a84d ("glsl: Refine the loop instruction counting.") papered over the problem. NOTE: This is a candidate for stable release branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50298 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
Still seems broken to me.
Issue still exist. Following cases still fail on IVB and SNB. shad-compiler(advanced.TestLessThanEquali) shad-compiler(advanced.TestGreaterThan) shad-compiler(advanced.TestGreaterThani) shad-compiler(advanced.TestGreaterThanEqual) shad-compiler(advanced.TestGreaterThanEquali) shad-compiler(advanced.TestEqualb) shad-compiler(advanced.TestNotEqual) shad-compiler(advanced.TestNotEquali) shad-compiler(advanced.TestNotEqualb)
I can't reproduce this on Ivybridge...it seems to be working there. On Sandybridge, this is fixed by the following patch on the mailing list: http://lists.freedesktop.org/archives/mesa-dev/2012-September/027519.html
(In reply to comment #7) > Issue still exist. > > Following cases still fail on IVB and SNB. > shad-compiler(advanced.TestLessThanEquali) > shad-compiler(advanced.TestGreaterThan) > shad-compiler(advanced.TestGreaterThani) > shad-compiler(advanced.TestGreaterThanEqual) > shad-compiler(advanced.TestGreaterThanEquali) > shad-compiler(advanced.TestEqualb) > shad-compiler(advanced.TestNotEqual) > shad-compiler(advanced.TestNotEquali) > shad-compiler(advanced.TestNotEqualb) Fixed on ivybridge. Still fails on sandybridge.
Eric has NAK'd my fix and is writing a better one. Reassigning.
commit 0482998ccc205a9d29953c7a8b33f41ae3584935 Author: Eric Anholt <eric@anholt.net> Date: Mon Nov 12 13:13:55 2012 -0800 i965/fs: Fix the gen6-specific if handling for 80ecb8f15b9ad7d6edc
(In reply to comment #11) > commit 0482998ccc205a9d29953c7a8b33f41ae3584935 > Author: Eric Anholt <eric@anholt.net> > Date: Mon Nov 12 13:13:55 2012 -0800 > > i965/fs: Fix the gen6-specific if handling for 80ecb8f15b9ad7d6edc Fixed on master branch. It still fails on sandybridge with 9.0 branch.
Eric/Ian, do we have plan to put the fix to 9.0 branch? If so we should keep this bug open, otherwise we can close it.
Cherry-picked to the 9.0 branch: 457eab5a9bf563b54d46fa57cba513837224b120 It will be available in Mesa 9.0.3.
Verified.Fixed on the latest 9.1 branch(commit:5b19631f7cffc0fb48).
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.