diff options
author | Rob Clark <[email protected]> | 2015-06-24 18:57:22 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-06-30 12:13:44 -0400 |
commit | 01b5f1336330f1c0f937fb08a444efc593b43435 (patch) | |
tree | a7fbd374d3ac5b7d10eaa208df2d8187c559e3b6 /src/gallium/drivers/freedreno | |
parent | 9350ea6979c48772e1fb55d4f1c7c5a3cfa987b0 (diff) |
freedreno/ir3: fix constlen in case of load_uniform_indirect
We can't rely on what we get from the assembler if we have indirect
addressing of constant file, since the assembler doesn't know the array
index. This got lost in the transition to NIR.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c index 48b1d8f3606..53b8a6fb101 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c @@ -1372,6 +1372,11 @@ emit_intrinisic(struct ir3_compile *ctx, nir_intrinsic_instr *intr) dst[i] = create_uniform_indirect(ctx, n, get_addr(ctx, src[0])); } + /* NOTE: if relative addressing is used, we set constlen in + * the compiler (to worst-case value) since we don't know in + * the assembler what the max addr reg value can be: + */ + ctx->so->constlen = ctx->s->num_uniforms; break; case nir_intrinsic_load_ubo: case nir_intrinsic_load_ubo_indirect: |