From 6fc52739bb49bd2ac94e909dcfe05caea49aa762 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Thu, 30 Jul 2020 21:25:12 +0200 Subject: [PATCH] etnaviv: fix nir validation problem Fixes the following validation problem: error: nir_intrinsic_align_offset(instr) < nir_intrinsic_align_mul(instr) Signed-off-by: Christian Gmeiner Tested-by: Lukas F. Hartmann Acked-by: Lucas Stach Part-of: --- src/gallium/drivers/etnaviv/etnaviv_nir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/etnaviv/etnaviv_nir.c b/src/gallium/drivers/etnaviv/etnaviv_nir.c index 13aa73b0839..210677b3adf 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_nir.c +++ b/src/gallium/drivers/etnaviv/etnaviv_nir.c @@ -88,6 +88,7 @@ etna_lower_io(nir_shader *shader, struct etna_shader_variant *v) nir_intrinsic_instr *load_ubo = nir_intrinsic_instr_create(b.shader, nir_intrinsic_load_ubo); load_ubo->num_components = intr->num_components; + nir_intrinsic_set_align(load_ubo, intr->dest.ssa.bit_size / 8, 0); nir_ssa_dest_init(&load_ubo->instr, &load_ubo->dest, load_ubo->num_components, 32, NULL); -- 2.30.2