Mesa (main): intel/compiler: ignore per-primitive attrs when calculating flat input mask
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Feb 25 22:57:29 UTC 2022
Module: Mesa
Branch: main
Commit: e2cb562dd1bd79f0e4b1b2597cfb0fa6b5f8c22a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e2cb562dd1bd79f0e4b1b2597cfb0fa6b5f8c22a
Author: Marcin Ślusarz <marcin.slusarz at intel.com>
Date: Thu Feb 24 17:06:33 2022 +0100
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 at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15169>
---
src/intel/compiler/brw_fs.cpp | 3 +++
1 file changed, 3 insertions(+)
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];
More information about the mesa-commit
mailing list