From: Iago Toral Quiroga Date: Tue, 30 Jun 2020 08:59:47 +0000 (+0200) Subject: v3d/compiler: fix image size for 1D arrays X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8456ff75b39839f793a7226d00746ee7ba2e713a;p=mesa.git v3d/compiler: fix image size for 1D arrays Reviewed by: Alejandro PiƱeiro Reviewed-by: Eric Anholt Part-of: --- diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c index 1092c6b41da..2b641240d53 100644 --- a/src/broadcom/compiler/nir_to_vir.c +++ b/src/broadcom/compiler/nir_to_vir.c @@ -1762,7 +1762,10 @@ ntq_emit_image_size(struct v3d_compile *c, nir_intrinsic_instr *instr) vir_uniform(c, QUNIFORM_IMAGE_WIDTH, image_index)); if (instr->num_components > 1) { ntq_store_dest(c, &instr->dest, 1, - vir_uniform(c, QUNIFORM_IMAGE_HEIGHT, + vir_uniform(c, + instr->num_components == 2 && is_array ? + QUNIFORM_IMAGE_ARRAY_SIZE : + QUNIFORM_IMAGE_HEIGHT, image_index)); } if (instr->num_components > 2) {