From fdd926d5b28aa4b1264c92b8189349caf847c725 Mon Sep 17 00:00:00 2001 From: Eduardo Lima Mitev Date: Sun, 21 Oct 2018 20:48:41 +0200 Subject: [PATCH] ir3/nir: Set up image_dims consts for image_deref_size intrinsic too `nir_intrinsic_image_deref_size` is not being considered during scan for driver constants, so image constants are not emitted if a shader only ever query the size of an image (no load, store, atomic op, etc). This is unlikely, but possible. Reviewed-by: Rob Clark --- src/gallium/drivers/freedreno/ir3/ir3_nir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/freedreno/ir3/ir3_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_nir.c index d934acc7427..63866ae4d01 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_nir.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_nir.c @@ -254,6 +254,7 @@ ir3_nir_scan_driver_consts(nir_shader *shader, case nir_intrinsic_image_deref_atomic_exchange: case nir_intrinsic_image_deref_atomic_comp_swap: case nir_intrinsic_image_deref_store: + case nir_intrinsic_image_deref_size: idx = nir_intrinsic_get_var(intr, 0)->data.driver_location; if (layout->image_dims.mask & (1 << idx)) break; -- 2.30.2