From: Eduardo Lima Mitev Date: Sun, 21 Oct 2018 18:48:41 +0000 (+0200) Subject: ir3/nir: Set up image_dims consts for image_deref_size intrinsic too X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fdd926d5b28aa4b1264c92b8189349caf847c725;p=mesa.git 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 --- 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;