From 6e781a01b97639057d44ca13c5d4276220745b3d Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Wed, 20 Mar 2019 10:38:01 -0400 Subject: [PATCH] freedreno/ir3: dynamic UBO indexing vs 64b pointers Fixes dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.uniform_fragment and similar things with multiple UBOs Signed-off-by: Rob Clark --- src/freedreno/ir3/ir3_compiler_nir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index b55f834920f..590b9455288 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -694,8 +694,8 @@ emit_intrinsic_load_ubo(struct ir3_context *ctx, nir_intrinsic_instr *intr, base_lo = create_uniform(b, ubo + (src0->regs[1]->iim_val * ptrsz)); base_hi = create_uniform(b, ubo + (src0->regs[1]->iim_val * ptrsz) + 1); } else { - base_lo = create_uniform_indirect(b, ubo, ir3_get_addr(ctx, src0, 4)); - base_hi = create_uniform_indirect(b, ubo + 1, ir3_get_addr(ctx, src0, 4)); + base_lo = create_uniform_indirect(b, ubo, ir3_get_addr(ctx, src0, ptrsz)); + base_hi = create_uniform_indirect(b, ubo + 1, ir3_get_addr(ctx, src0, ptrsz)); } /* note: on 32bit gpu's base_hi is ignored and DCE'd */ -- 2.30.2