From: Rob Clark Date: Wed, 20 Mar 2019 14:38:01 +0000 (-0400) Subject: freedreno/ir3: dynamic UBO indexing vs 64b pointers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6e781a01b97639057d44ca13c5d4276220745b3d;p=mesa.git 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 --- 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 */