Bug 86811

Summary: [BDW/BSW Bisected]Piglit spec_arb_shading_language_packing_execution_built-in-functions_vs-unpackSnorm4x8 fails
Product: Mesa Reporter: lu hua <huax.lu>
Component: Drivers/DRI/i965Assignee: Matt Turner <mattst88>
Status: VERIFIED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: major    
Priority: medium CC: idr
Version: unspecified   
Hardware: All   
OS: Linux (All)   
URL: http://lists.freedesktop.org/archives/mesa-dev/2015-February/076761.html
Whiteboard:
i915 platform: i915 features:

Description lu hua 2014-11-28 06:31:33 UTC
System Environment:
--------------------------
Platform: BDW
Libdrm:		(master)libdrm-2.4.58-13-gfb4177046de19730a784c3c16e4b73aab0ec6e41
Mesa:		(master)91a827624c01d40613e97322632aaffe319540f1
Xserver:	(master)xorg-server-1.16.99.901-17-gc52a2b1ebad56820af932dfbc871701a8b04fd9c
Xf86_video_intel:(master)2.99.916-154-g0f15b8b45bb6de10ce1926db303247a5bd3c1c08
Libva:		(master)c095cc6cf08523cd0dffcfe5ac4bce9122527f22
Libva_intel_driver:(master)edbb8cdada09cd116103e68f942b0889fd767391
Kernel:   (drm-intel-nightly)904b8529cd69f98b98d33b533a211003f99fb1cd

Bug detailed description:
-----------------------------
It fails on BDW with mesa master branch, works well on 10.4 branch.
spec_arb_shading_language_packing_execution_built-in-functions_vs-unpackUnorm4x8 also fails.

Bisect shows: 94a30bbd4fe5f3eda167819e307f736268fd33f6 is the first bad commit.
commit 94a30bbd4fe5f3eda167819e307f736268fd33f6
Author:     Matt Turner <mattst88@gmail.com>
AuthorDate: Sun Mar 9 20:22:23 2014 -0700
Commit:     Matt Turner <mattst88@gmail.com>
CommitDate: Tue Nov 25 17:29:02 2014 -0800

    i965/vec4: Optimize unpackSnorm4x8().

    Reduces the number of instructions needed to implement unpackSnorm4x8()
    from 16 -> 6.

    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

output:
Probe color at (0,0)
  Expected: 0.000000 1.000000 0.000000 1.000000
  Observed: 1.000000 0.000000 0.000000 1.000000
PIGLIT: {"result": "fail" }

Reproduce steps:
---------------------------- 
1. xinit
2. ./bin/shader_runner generated_tests/spec/arb_shading_language_packing/execution/built-in-functions/vs-unpackSnorm4x8.shader_test -auto
Comment 1 lu hua 2014-12-03 07:40:43 UTC
It also fails on BSW.
Comment 2 Matt Turner 2015-02-06 21:05:48 UTC
Note that this will only be reproducible with the vec4 backend, which you can force-enable with INTEL_DEBUG=vec4vs.
Comment 3 Matt Turner 2015-02-12 02:18:41 UTC
Patch on the list.
Comment 4 Matt Turner 2015-02-20 06:10:26 UTC
Fixed by

commit e0137fd6f720e4977466b1760ac02a72c5abceb8
Author: Matt Turner <mattst88@gmail.com>
Date:   Thu Feb 12 01:42:43 2015 +0000

    i965/vec4: Add and use byte-MOV instruction for unpack 4x8.
    
    Previously we were using a B/UB source in an Align16 instruction, which
    is illegal. It for some reason works on all platforms, except Broadwell.
    
    Cc: "10.5" <mesa-stable@lists.freedesktop.org>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86811
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Comment 5 lu hua 2015-03-02 07:35:04 UTC
Verified.Fixed.

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.