agx: Fix mismatched units in load_ubo
Fixes assertion failure in
dEQP-GLES3.functional.ubo.single_basic_type.shared.highp_float_fragment
Assertion failed: ((value & 1) == 0), function agx_print_sized, file
../src/asahi/compiler/agx_print.c, line 39.
Fixes: 033d4d09fc ("agx: Implement load_ubo/kernel_input")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053>
This commit is contained in:
@@ -288,10 +288,12 @@ agx_emit_load_ubo(agx_builder *b, nir_intrinsic_instr *instr)
|
||||
/* Each UBO has a 64-bit = 4 x 16-bit address */
|
||||
unsigned num_ubos = b->shader->nir->info.num_ubos;
|
||||
unsigned base_length = (num_ubos * 4);
|
||||
unsigned index = block * 4; /* 16 bit units */
|
||||
|
||||
/* Lookup the base address (TODO: indirection) */
|
||||
agx_index base = agx_indexed_sysval(b->shader,
|
||||
AGX_PUSH_UBO_BASES, AGX_SIZE_64, block, base_length);
|
||||
AGX_PUSH_UBO_BASES, AGX_SIZE_64,
|
||||
index, base_length);
|
||||
|
||||
/* Load the data */
|
||||
assert(instr->num_components <= 4);
|
||||
|
||||
Reference in New Issue
Block a user