Bug 97032 - [BDW,SKL] piglit.spec.arb_gpu_shader5.arb_gpu_shader5-interpolateatcentroid-flat
Summary: [BDW,SKL] piglit.spec.arb_gpu_shader5.arb_gpu_shader5-interpolateatcentroid-flat
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Kenneth Graunke
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-21 22:32 UTC by Mark Janes
Modified: 2016-07-23 03:34 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Janes 2016-07-21 22:32:09 UTC
This test asserts:

arb_gpu_shader5-interpolateAtCentroid-flat: src/mesa/drivers/dri/i965/brw_fs.cpp:1089: brw_barycentric_mode brw_barycentric_mode(glsl_interp_mode, nir_intrinsic_op): Assertion `mode != INTERP_MODE_FLAT' failed.

Bisected to:
i965: enable GL4.4 for Gen8+
Comment 1 Kenneth Graunke 2016-07-22 00:33:18 UTC
Apparently enabling GL 4.4 disabled varying packing, somehow...which is scary...

It looks like varying packing was sweeping this under the rug.  We need to ignore interpolateAtCentroid/Sample for flats and just give back the flat input.
Comment 2 Kenneth Graunke 2016-07-22 18:06:52 UTC
Apparently varying packing getting disabled was a bug, and Timothy's pushed a fix for that.  However, I'm pretty sure this is still a bug in my code, so here's a patch to fix it:

https://lists.freedesktop.org/archives/mesa-dev/2016-July/124211.html
Comment 3 Kenneth Graunke 2016-07-23 03:34:04 UTC
Fixed on Mesa master, probably with:

commit 0ba7288376dc66f932336862c8a6abb629b47686
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Thu Jul 21 17:42:01 2016 -0700

    nir: Lower interp_var_at_* like a normal load_var for flat inputs.
    
    "flat centroid" and "flat sample" both just mean "flat", so we should
    ignore interpolateAtCentroid/Sample and just return the flat value.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97032
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
    Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>


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