[Mesa-dev] [PATCH 3/3] radeonsi: don't call force_dcc_off for buffers

Marek Olšák maraeo at gmail.com
Tue Dec 12 21:47:05 UTC 2017


From: Marek Olšák <marek.olsak at amd.com>

This was undefined yet harmless behavior in LLVM.
Not anymore - it causes a hang now.

Cc: 17.3 <mesa-stable at lists.freedesktop.org>
---
 src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c
index 35ada5f..80f986a 100644
--- a/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c
+++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c
@@ -139,21 +139,21 @@ LLVMValueRef si_load_image_desc(struct si_shader_context *ctx,
 				     LLVMConstInt(ctx->i32, 2, 0), "");
 		index = LLVMBuildAdd(builder, index,
 				     ctx->i32_1, "");
 		list = LLVMBuildPointerCast(builder, list,
 					    si_const_array(ctx->v4i32, 0), "");
 	} else {
 		assert(desc_type == AC_DESC_IMAGE);
 	}
 
 	rsrc = ac_build_load_to_sgpr(&ctx->ac, list, index);
-	if (dcc_off)
+	if (desc_type == AC_DESC_IMAGE && dcc_off)
 		rsrc = force_dcc_off(ctx, rsrc);
 	return rsrc;
 }
 
 /**
  * Load the resource descriptor for \p image.
  */
 static void
 image_fetch_rsrc(
 	struct lp_build_tgsi_context *bld_base,
-- 
2.7.4



More information about the mesa-dev mailing list