mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 15:50:11 +01:00
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: 580e1c592d ("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>
This commit is contained in:
parent
51c85e0363
commit
da395e6985
1 changed files with 1 additions and 1 deletions
|
|
@ -1740,7 +1740,7 @@ extract_imm(brw_reg val, brw_reg_type type, unsigned offset)
|
||||||
|
|
||||||
assert(bitsize < brw_type_size_bits(val.type));
|
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;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue