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.
i965: enable GL4.4 for Gen8+
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.
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:
Fixed on Mesa master, probably with:
Author: Kenneth Graunke <firstname.lastname@example.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.
Signed-off-by: Kenneth Graunke <email@example.com>
Reviewed-by: Jason Ekstrand <firstname.lastname@example.org>
Reviewed-by: Anuj Phogat <email@example.com>
on Jan 19, 2017 at 21:19:01.
(provided by the Example extension).