summaryrefslogtreecommitdiff
path: root/src/asahi
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>2021-07-24 14:39:44 -0400
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>2021-07-24 14:39:44 -0400
commit5fb9159eb97e439e67145107b11512a66fe86cc8 (patch)
treeb92a7760bbb2ce5b91a92cfb7f005326e87a7b08 /src/asahi
parent5deb7c26d67bcb37daaeb1d5132393d81555f63c (diff)
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: 033d4d09fc7 ("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>
Diffstat (limited to 'src/asahi')
-rw-r--r--src/asahi/compiler/agx_compile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c
index 64b28f8e999..7ac264f05a4 100644
--- a/src/asahi/compiler/agx_compile.c
+++ b/src/asahi/compiler/agx_compile.c
@@ -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);