mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-04 00:08:16 +02:00
pan/bi: Fix function temp lowering with 64-bit pointers
OpenCL-CTS `test_basic vload_private` fails with the following
assertion:
```
src/compiler/nir/nir_lower_explicit_io.c:1649: lower_explicit_io_deref:
Assertion `addr->bit_size == deref->def.bit_size' failed.
```
Use `nir_address_format_32bit_offset_as_64bit` when the shader has
64-bit pointers. The scratch offset is still 32-bit, but the NIR address
value now matches the 64-bit derefs being lowered.
Fixes: 01e6a0555c ("pan/compiler: Rework scratch memory strategy")
Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41769>
This commit is contained in:
parent
87e5fb2dcb
commit
617d4810c1
1 changed files with 6 additions and 1 deletions
|
|
@ -984,8 +984,13 @@ bifrost_postprocess_nir(nir_shader *nir,
|
|||
*/
|
||||
NIR_PASS(_, nir, nir_lower_vars_to_explicit_types, nir_var_function_temp,
|
||||
glsl_get_natural_size_align_bytes);
|
||||
|
||||
nir_address_format scratch_addr_format =
|
||||
nir_get_ptr_bitsize(nir) == 64 ? nir_address_format_32bit_offset_as_64bit
|
||||
: nir_address_format_32bit_offset;
|
||||
|
||||
NIR_PASS(_, nir, nir_lower_explicit_io, nir_var_function_temp,
|
||||
nir_address_format_32bit_offset);
|
||||
scratch_addr_format);
|
||||
}
|
||||
|
||||
nir_lower_mem_access_bit_sizes_options mem_size_options = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue