Mesa (staging/20.1): intel/vec4: Stomp the return type of RESINFO to UINT32
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 1 16:45:52 UTC 2020
Module: Mesa
Branch: staging/20.1
Commit: 191b2efd97873ce1d817af0391b886e9b039db2b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=191b2efd97873ce1d817af0391b886e9b039db2b
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Sat Apr 25 14:15:11 2020 -0500
intel/vec4: Stomp the return type of RESINFO to UINT32
We already do this in the FS back-end; we just weren't doing it in vec4
so RESINFO messages weren't returning the right data.
Cc: mesa-stable at lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5243>
(cherry picked from commit a7c8811fe4012b60a9bcdb2ea2ef6ab79e402809)
---
.pick_status.json | 2 +-
src/intel/compiler/brw_vec4_generator.cpp | 11 +++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index f62b403bc7a..38ca53b981d 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -58,7 +58,7 @@
"description": "intel/vec4: Stomp the return type of RESINFO to UINT32",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/intel/compiler/brw_vec4_generator.cpp b/src/intel/compiler/brw_vec4_generator.cpp
index be6697cc16c..3fe1edc38ac 100644
--- a/src/intel/compiler/brw_vec4_generator.cpp
+++ b/src/intel/compiler/brw_vec4_generator.cpp
@@ -270,6 +270,17 @@ generate_tex(struct brw_codegen *p,
break;
}
+ /* Stomp the resinfo output type to UINT32. On gens 4-5, the output type
+ * is set as part of the message descriptor. On gen4, the PRM seems to
+ * allow UINT32 and FLOAT32 (i965 PRM, Vol. 4 Section 4.8.1.1), but on
+ * later gens UINT32 is required. Once you hit Sandy Bridge, the bit is
+ * gone from the message descriptor entirely and you just get UINT32 all
+ * the time regasrdless. Since we can really only do non-UINT32 on gen4,
+ * just stomp it to UINT32 all the time.
+ */
+ if (inst->opcode == SHADER_OPCODE_TXS)
+ return_format = BRW_SAMPLER_RETURN_FORMAT_UINT32;
+
uint32_t base_binding_table_index = (inst->opcode == SHADER_OPCODE_TG4 ||
inst->opcode == SHADER_OPCODE_TG4_OFFSET)
? prog_data->base.binding_table.gather_texture_start
More information about the mesa-commit
mailing list