Bug 91022 - [g45 g965 bisected] assertions generated from textureGrad cube samplers fix
Summary: [g45 g965 bisected] assertions generated from textureGrad cube samplers fix
Status: CLOSED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Kenneth Graunke
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-18 16:19 UTC by Mark Janes
Modified: 2015-09-02 23:00 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Fix for the bug (untested) (2.06 KB, patch)
2015-06-18 23:13 UTC, Kenneth Graunke
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Janes 2015-06-18 16:19:00 UTC
The following commit fixed 4 piglit tests on newer platforms:

commit 2b1cdb0eddb73f62e4848d4b64840067f1f70865
Author: Iago Toral Quiroga <itoral@igalia.com>
Date:   Tue Feb 24 19:02:50 2015 +0100

    i965: Fix textureGrad with cube samplers


However, it created new assertions on g965 and g45.

-----------------------------------------------------
g45:
spec.arb_shader_texture_lod.execution.tex-miplevel-selection *gradarb cube
Standard Output
/tmp/build_root/m64/lib/piglit/bin/tex-miplevel-selection *GradARB Cube -auto -fbo

Standard Error
tex-miplevel-selection: /var/lib/jenkins/jobs/Leeroy/workspace/repos/mesa/src/mesa/drivers/dri/i965/brw_fs_generator.cpp:704: void fs_generator::generate_tex(fs_inst*, brw_reg, brw_reg, brw_reg): Assertion `inst->mlen == 3' failed.

-----------------------------------------------------
g45:
spec.arb_shader_texture_lod.execution.arb_shader_texture_lod-texgradcube
Standard Output
/tmp/build_root/m64/lib/piglit/bin/arb_shader_texture_lod-texgradcube -auto -fbo

Standard Error
arb_shader_texture_lod-texgradcube: /var/lib/jenkins/jobs/Leeroy/workspace/repos/mesa/src/mesa/drivers/dri/i965/brw_fs_generator.cpp:704: void fs_generator::generate_tex(fs_inst*, brw_reg, brw_reg, brw_reg): Assertion `inst->mlen == 3' failed.

-----------------------------------------------------
g965:
spec.arb_shader_texture_lod.compiler.tex_grad-texturecube-cube-vec3.frag
Standard Output
/tmp/build_root/m64/lib/piglit/bin/glslparsertest /tmp/build_root/m64/lib/piglit/generated_tests/spec/arb_shader_texture_lod/compiler/tex_grad-textureCube-Cube-vec3.frag pass 1.10 GL_ARB_shader_texture_lod

Standard Error
glslparsertest: /var/lib/jenkins/jobs/Leeroy/workspace/repos/mesa/src/mesa/drivers/dri/i965/brw_fs_generator.cpp:704: void fs_generator::generate_tex(fs_inst*, brw_reg, brw_reg, brw_reg): Assertion `inst->mlen == 3' failed.
-----------------------------------------------------


It may be that these assertions are intermittent.
Comment 1 Kenneth Graunke 2015-06-18 23:13:55 UTC
Created attachment 116584 [details] [review]
Fix for the bug (untested)

My Gen4 SIMD16 texturing code was broken.  I've attached a patch which should fix it, but I haven't had access to my machine to piglit test it yet.

The tests still assert fail, but due to another existing bug with tile offsets.
Comment 2 Iago Toral 2015-06-19 05:50:20 UTC
(In reply to Kenneth Graunke from comment #1)
> Created attachment 116584 [details] [review] [review]
> Fix for the bug (untested)
> 
> My Gen4 SIMD16 texturing code was broken.  I've attached a patch which
> should fix it, but I haven't had access to my machine to piglit test it yet.
> 
> The tests still assert fail, but due to another existing bug with tile
> offsets.

Ugh, sorry about this... I don't have gen4 hardware available and never imagined this could break older gens like this.

Since you have a patch for this and the driver still hits more problems down the line I fear that my change is driving the gen4 code through paths that were not ready for this. If it creates too much havoc for you we can always limit my change to gen >= 5 while we figure out how to apply this to gen4.
Comment 3 Kenneth Graunke 2015-06-19 17:44:07 UTC
Don't worry about it!  The original bug was just a stupid mistake I made recently, and the final thing causing them to fail is a long-time bug we really ought to fix that has absolutely nothing to do with what you did :)
Comment 4 Mark Janes 2015-06-19 18:19:07 UTC
With Ken's patch, the crashes are gone.  One g45 test continues
to fail, the others are fixed.  The remaining failure:
-----------------------------------------------------
g45:
spec.arb_shader_texture_lod.execution.arb_shader_texture_lod-texgradcube

crash changed to failure:

/tmp/build_root/m64/lib/piglit/bin/arb_shader_texture_lod-texgradcube -auto -fbo
Left: textureCube, Right: textureCubeGradARB
Probe color at (80,78)
  Left: 0.678431 0.333333 0.000000 1.000000
  Right: 0.647059 0.349020 0.000000 1.000000


bug/show.html.tmpl processed on Jan 16, 2017 at 19:22:13.
(provided by the Example extension).