Bug 37366

Summary: [i965 bisected ILK] Fragment shader discard tests occasionally fail
Product: Mesa Reporter: Ian Romanick <idr>
Component: Drivers/DRI/i965Assignee: Ian Romanick <idr>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Ian Romanick 2011-05-19 06:27:38 UTC
On my Ironlake 64-bit system (Thinkpad X201s) fragment shader discard tests will periodically fail.  Usually they pass, but not always.  Running 'occlusion-query-discard -auto' I occasionally see one of:

occlusion-query-discard: brw_eu.h:189: brw_reg brw_reg(GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint): Assertion `(nr & ~(1 << 7)) < 16' failed.

or

occlusion-query-discard: brw_eu.h:191: brw_reg brw_reg(GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint): Assertion `nr <= 0xA0' failed.

with this patch:

commit 51761a1aefd31b7df12edd9467ac630b9cbbbbc9
Author: Eric Anholt <eric@anholt.net>
Date:   Tue May 10 15:30:11 2011 -0700

    i965/fs: Cut an instruction and a temporary from gen6 discard statements.
    
    I thought I was thwarted initially when I couldn't do conditional mod
    on a MOV, and couldn't use two immediate constants in one instruction.
    But g0 != g0 is also a way to produce a failing comparison.
    
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Comment 1 Eric Anholt 2011-05-25 17:37:37 UTC
commit fa42de5ad7ebbc0b81ce6ba0553742f0413690a7
Author: Eric Anholt <eric@anholt.net>
Date:   Tue May 24 12:36:50 2011 -0700

    i965: Fix assertion failures in unused brw_reg setup by deleting it.
    
    I was using undefined values to create an unused value.  Go me.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37366
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

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.