Bug 79963 - [ILK Bisected]some piglit and ogles2conform cases fail
Summary: [ILK Bisected]some piglit and ogles2conform cases fail
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium major
Assignee: Kenneth Graunke
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-13 02:18 UTC by lu hua
Modified: 2014-08-25 01:27 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description lu hua 2014-06-13 02:18:00 UTC
System Environment:
--------------------------
Platform: Ironlake
Libdrm:		(master)libdrm-2.4.54-9-g8fc62ca8ac010659023bb63c4759eb683de4f9af
Mesa:		(master)c6f118484c3d45e4ba18c36e5cc0517eb33b39fc
Xserver:	(master)xorg-server-1.15.99.903-1-ge27a839bf0488d5b1cc2e2a887f2ea0e3d790790
Xf86_video_intel:(master)2.99.912-32-gabbf6d6b7962650607dc3517939991de56ce8a91
Libva:		(staging)35e70cb9b9c77dfb99fb370e319ed501f0c31b17
Libva_intel_driver:(staging)d49b82d82c5aa40de333aadd298bec45ab2b3d35
Kernel:	(drm-intel-nightly) 1d3e80d9ff52ecaeecc5b78de32f9bb07ad2231f

Bug detailed description:
-----------------------------
Some Piglit and Ogles2conform cases fail on Ironlake with mesa master branch, work well on 10.2 branch.
Piglit cases:
spec_glsl-1.10_execution_built-in-functions_vs-equal-bvec2-bvec2
spec_glsl-1.10_execution_built-in-functions_vs-equal-bvec3-bvec3
spec_glsl-1.10_execution_built-in-functions_vs-equal-bvec4-bvec4
spec_glsl-1.10_execution_built-in-functions_vs-equal-ivec2-ivec2
spec_glsl-1.10_execution_built-in-functions_vs-equal-ivec3-ivec3
spec_glsl-1.10_execution_built-in-functions_vs-equal-ivec4-ivec4
spec_glsl-1.10_execution_built-in-functions_vs-equal-vec2-vec2
spec_glsl-1.10_execution_built-in-functions_vs-equal-vec3-vec3
spec_glsl-1.10_execution_built-in-functions_vs-equal-vec4-vec4
spec_glsl-1.10_execution_built-in-functions_vs-lessThan-ivec2-ivec2
spec_glsl-1.10_execution_built-in-functions_vs-lessThan-ivec3-ivec3
spec_glsl-1.10_execution_built-in-functions_vs-lessThan-ivec4-ivec4
spec_glsl-1.10_execution_built-in-functions_vs-lessThan-vec2-vec2
spec_glsl-1.10_execution_built-in-functions_vs-lessThan-vec3-vec3
spec_glsl-1.10_execution_built-in-functions_vs-lessThan-vec4-vec4
spec_glsl-1.10_execution_built-in-functions_vs-lessThanEqual-ivec2-ivec2
spec_glsl-1.10_execution_built-in-functions_vs-lessThanEqual-ivec3-ivec3
spec_glsl-1.10_execution_built-in-functions_vs-lessThanEqual-ivec4-ivec4
spec_glsl-1.10_execution_built-in-functions_vs-lessThanEqual-vec2-vec2
spec_glsl-1.10_execution_built-in-functions_vs-lessThanEqual-vec3-vec3
spec_glsl-1.10_execution_built-in-functions_vs-lessThanEqual-vec4-vec4
spec_glsl-1.10_execution_built-in-functions_vs-op-le-float-float
spec_glsl-1.10_execution_built-in-functions_vs-op-le-int-int
spec_glsl-1.10_execution_built-in-functions_vs-op-lt-float-float
spec_glsl-1.10_execution_built-in-functions_vs-op-lt-int-int
spec_glsl-1.10_execution_built-in-functions_vs-step-float-float
spec_glsl-1.10_execution_built-in-functions_vs-step-float-vec2
spec_glsl-1.10_execution_built-in-functions_vs-step-float-vec3
spec_glsl-1.10_execution_built-in-functions_vs-step-float-vec4
spec_glsl-1.10_execution_built-in-functions_vs-step-vec2-vec2
spec_glsl-1.10_execution_built-in-functions_vs-step-vec3-vec3
spec_glsl-1.10_execution_built-in-functions_vs-step-vec4-vec4

Ogles2conform cases:
GL_equal_equal_bvec2_vert.test
GL_equal_equal_bvec3_vert.test
GL_equal_equal_ivec2_vert.test
GL_equal_equal_ivec3_vert.test
GL_equal_equal_vec2_vert.test
GL_equal_equal_vec3_vert.test
GL_greaterThanEqual_greaterThanEqual_ivec2_vert.test
GL_greaterThanEqual_greaterThanEqual_ivec3_vert.test
GL_greaterThanEqual_greaterThanEqual_vec2_vert.test
GL_greaterThanEqual_greaterThanEqual_vec3_vert.test
GL_lessThanEqual_lessThanEqual_ivec2_vert.test
GL_lessThanEqual_lessThanEqual_ivec3_vert.test
GL_lessThanEqual_lessThanEqual_vec2_vert.test
GL_lessThanEqual_lessThanEqual_vec3_vert.test
GL_lessThan_lessThan_ivec2_vert.test
GL_lessThan_lessThan_ivec3_vert.test
GL_lessThan_lessThan_vec2_vert.test
GL_lessThan_lessThan_vec3_vert.test

Bisect shows: 63117ac32948310c87e30f67b475a07f98884633 is the first bad commit.
commit 63117ac32948310c87e30f67b475a07f98884633
Author:     Ian Romanick <ian.d.romanick@intel.com>
AuthorDate: Tue Jun 10 18:07:50 2014 -0700
Commit:     Ian Romanick <ian.d.romanick@intel.com>
CommitDate: Wed Jun 11 12:00:24 2014 -0700

    i965/vec4: Emit smarter code for b2f of a comparison

    Previously we would emit the comparison, emit an AND to mask off extra
    bits from the comparison result, then convert the result to float.  Now,
    do the comparison, then use a cleverly constructed SEL to pick either
    0.0f or 1.0f.

    No piglit regressions on Ivybridge.

    total instructions in shared programs: 1642311 -> 1639449 (-0.17%)
    instructions in affected programs:     136533 -> 133671 (-2.10%)
    GAINED:                                0
    LOST:                                  0

    Programs that are affected appear to save between 1 and 5 instuctions
    (just by skimming the output from shader-db report.py.

    v2: s/b2i/b2f/ in commit subject (noticed by Chris Forbes).  Remove
    extraneous fix_3src_operand (suggested by Matt).  The latter change
    required swapping the order of the operands and using predicate_inverse.

    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
    Reviewed-by: Matt Turner <mattst88@gmail.com>

run bin/shader_runner generated_tests/spec/glsl-1.10/execution/built-in-functions/vs-equal-bvec2-bvec2.shader_test -auto
output:
Probe color at (1,0)
  Expected: 0.000000 1.000000 0.000000 0.000000
  Observed: 1.000000 1.000000 0.000000 0.000000
PIGLIT: {'result': 'fail' }

Reproduce steps:
---------------------------- 
1. xinit
2. bin/shader_runner generated_tests/spec/glsl-1.10/execution/built-in-functions/vs-equal-bvec2-bvec2.shader_test -auto
Comment 1 Kaveh 2014-08-04 18:48:05 UTC
Please confirm that this is seen on SNB or newer platforms.
Comment 2 lu hua 2014-08-05 05:51:28 UTC
(In reply to comment #1)
> Please confirm that this is seen on SNB or newer platforms.

It only happens on ILK platform, Works well on SNB+ platforms.
Comment 3 Kenneth Graunke 2014-08-16 22:15:12 UTC
Patch on mailing list:
http://lists.freedesktop.org/archives/mesa-dev/2014-August/065928.html
Comment 4 lu hua 2014-08-18 06:48:28 UTC
(In reply to comment #3)
> Patch on mailing list:
> http://lists.freedesktop.org/archives/mesa-dev/2014-August/065928.html

Fixed by this patch.
Comment 5 Kenneth Graunke 2014-08-22 18:39:50 UTC
commit 97d03b9366bfa55b27feb92aa5afacd9c5f6f421
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Sat Aug 16 15:18:21 2014 -0700

    i965: Disable try_emit_b2f_of_compare on Gen4-6.
    
    The optimization relies on CMP setting the destination to 0, which is
    equivalent to 0.0f.  However, early platforms only set the least
    significant byte, leaving the other bits undefined.  So, we must disable
    the optimization on those platforms.
    
    Oddly, Sandybridge wasn't reported as broken.  The PRM states that it
    only sets the LSB, but the internal documentation says that it follows
    the IVB behavior.  Since it wasn't reported as broken, we believe it
    really does follow the IVB behavior.
    
    v2: Allow the optimization on Sandybridge (requested by Matt).
    
    +32 piglits on Ironlake.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?=79963
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
    Reviewed-by: Matt Turner <mattst88@gmail.com>
Comment 6 lu hua 2014-08-25 01:27:35 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.