[Mesa-dev] [PATCH 10/11] i965/fs: Don't allow SINT32 as a return type for resinfo
Jason Ekstrand
jason at jlekstrand.net
Wed Nov 11 17:26:30 PST 2015
---
src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index 974219f..dad541b 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -680,7 +680,15 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src
switch (dst.type) {
case BRW_REGISTER_TYPE_D:
- return_format = BRW_SAMPLER_RETURN_FORMAT_SINT32;
+ /* SINT32 isn't actually allowed for TXS. This isn't explicitly stated
+ * in the PRM, but the i965 PRM explicitly lists UINT32 and FLOAT32 as
+ * being valid for resinfo but not SINT32 (Vol. 4 Section 4.8.1.1).
+ * Emperical testing has also verified this.
+ */
+ if (inst->opcode == SHADER_OPCODE_TXS)
+ return_format = BRW_SAMPLER_RETURN_FORMAT_UINT32;
+ else
+ return_format = BRW_SAMPLER_RETURN_FORMAT_SINT32;
break;
case BRW_REGISTER_TYPE_UD:
return_format = BRW_SAMPLER_RETURN_FORMAT_UINT32;
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list