[Mesa-dev] [PATCH] ac: remove arrays when when querying sampler info

Timothy Arceri tarceri at itsqueeze.com
Fri Jan 19 04:53:06 UTC 2018


Fixes the following ARB_arrays_of_arrays piglit tests:

basic-imagestore-const-uniform-index
basic-imagestore-mixed-const-non-const-uniform-index
basic-imagestore-mixed-const-non-const-uniform-index2
basic-imagestore-non-const-uniform-index
---
 src/amd/common/ac_nir_to_llvm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 4f240db4ac..345954c8b2 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -3530,8 +3530,8 @@ static LLVMValueRef get_image_coords(struct ac_nir_context *ctx,
 	LLVMValueRef sample_index = ac_llvm_extract_elem(&ctx->ac, get_src(ctx, instr->src[1]), 0);
 
 	int count;
-	enum glsl_sampler_dim dim = glsl_get_sampler_dim(type);
-	bool is_array = glsl_sampler_type_is_array(type);
+	enum glsl_sampler_dim dim = glsl_get_sampler_dim(glsl_without_array(type));
+	bool is_array = glsl_sampler_type_is_array(glsl_without_array(type));
 	bool add_frag_pos = (dim == GLSL_SAMPLER_DIM_SUBPASS ||
 			     dim == GLSL_SAMPLER_DIM_SUBPASS_MS);
 	bool is_ms = (dim == GLSL_SAMPLER_DIM_MS ||
-- 
2.14.3



More information about the mesa-dev mailing list