ac: pass write param to get_sampler_desc() from get_image_descriptor()
authorTimothy Arceri <tarceri@itsqueeze.com>
Fri, 27 Jul 2018 05:08:28 +0000 (15:08 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 27 Jul 2018 22:57:03 +0000 (08:57 +1000)
Looks like a mistake from when the deref stuff landed.

Fixes: 506a07e4e3a4 ("ac/nir: Add deref support to image intrinsics.")
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_nir_to_llvm.c

index 44361be0d35bd2aafb90fdf09ff3cd12257ca2ad..cffc980e51f9d34e54e94bddc46d71c9242abc4d 100644 (file)
@@ -2201,7 +2201,7 @@ static LLVMValueRef get_image_descriptor(struct ac_nir_context *ctx,
                                          enum ac_descriptor_type desc_type,
                                          bool write)
 {
-       return get_sampler_desc(ctx, nir_instr_as_deref(instr->src[0].ssa->parent_instr), desc_type, NULL, true, true);
+       return get_sampler_desc(ctx, nir_instr_as_deref(instr->src[0].ssa->parent_instr), desc_type, NULL, true, write);
 }
 
 static void get_image_coords(struct ac_nir_context *ctx,