freedreno/ir3: dynamic UBO indexing vs 64b pointers
authorRob Clark <robdclark@gmail.com>
Wed, 20 Mar 2019 14:38:01 +0000 (10:38 -0400)
committerRob Clark <robdclark@gmail.com>
Thu, 21 Mar 2019 13:13:05 +0000 (09:13 -0400)
Fixes dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.uniform_fragment
and similar things with multiple UBOs

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/freedreno/ir3/ir3_compiler_nir.c

index b55f834920f137ac31e7f5cb4cd6fb143fba8642..590b9455288cf2fe93e4ee8c40611f1b0d4f274b 100644 (file)
@@ -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 */