summaryrefslogtreecommitdiff
path: root/src/intel
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2024-08-12 13:55:08 -0700
committerEric Engestrom <eric@engestrom.ch>2024-08-29 16:30:16 +0200
commita7b7b8753a54c6933cbab6e107d43a037c8191ad (patch)
tree1c45593397baf2863bd6f6fda96d1a1efa75e9ab /src/intel
parent139398f124c1559e77dbd465222aa08c66226a25 (diff)
intel/brw: Fix extract_imm for subregion reads of 64-bit immediates
We could be trying to extract a D/UD from a Q/UQ, for example. We were ignoring the top 32-bits, which is incorrect. Fixes: 580e1c592d90 ("intel/brw: Introduce a new SSA-based copy propagation pass") Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30884> (cherry picked from commit da395e6985ab32978ebe120fe83ef05989c1a3e6)
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/compiler/brw_fs_copy_propagation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/compiler/brw_fs_copy_propagation.cpp b/src/intel/compiler/brw_fs_copy_propagation.cpp
index c1064051054..4ff79565c6d 100644
--- a/src/intel/compiler/brw_fs_copy_propagation.cpp
+++ b/src/intel/compiler/brw_fs_copy_propagation.cpp
@@ -1740,7 +1740,7 @@ extract_imm(brw_reg val, brw_reg_type type, unsigned offset)
assert(bitsize < brw_type_size_bits(val.type));
- val.ud = (val.ud >> (bitsize * offset)) & ((1u << bitsize) - 1);
+ val.u64 = (val.u64 >> (bitsize * offset)) & ((1ull << bitsize) - 1);
return val;
}