summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Ĺšlusarz <marcin.slusarz@intel.com>2022-02-24 17:06:33 +0100
committerMarge Bot <emma+marge@anholt.net>2022-02-25 22:34:22 +0000
commite2cb562dd1bd79f0e4b1b2597cfb0fa6b5f8c22a (patch)
tree4994b933fafe3e0d0a032de9709f4b9e44eb154a
parent216da26b3f323ce61e2355ad4a6f5e3bbe3e874c (diff)
intel/compiler: ignore per-primitive attrs when calculating flat input mask
If we say that per-primitive attributes are flat (which is communicated by 3DSTATE_SBE.ConstantInterpolationEnable), GPU freaks out and applies it to other (non-flat) attributes. Fixes: be89ea3231c ("intel/compiler: Handle per-primitive inputs in FS") Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15169>
-rw-r--r--src/intel/compiler/brw_fs.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index 359262ca489..46e346ec984 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -9452,6 +9452,9 @@ brw_compute_flat_inputs(struct brw_wm_prog_data *prog_data,
prog_data->flat_inputs = 0;
nir_foreach_shader_in_variable(var, shader) {
+ if (var->data.per_primitive)
+ continue;
+
unsigned slots = glsl_count_attribute_slots(var->type, false);
for (unsigned s = 0; s < slots; s++) {
int input_index = prog_data->urb_setup[var->data.location + s];