[Mesa-dev] [PATCH] r600g/llvm: Fix for bug 59588 (llvm rv780 etqw gpu lock

Vincent Lejeune vljn at ovi.com
Thu Jan 24 07:07:19 PST 2013


---
 src/gallium/drivers/r600/r600_llvm.c | 38 ++++++++++++++++++++++++++++++++++--
 1 file changed, 36 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/r600/r600_llvm.c
index 32b8e56..d28182b 100644
--- a/src/gallium/drivers/r600/r600_llvm.c
+++ b/src/gallium/drivers/r600/r600_llvm.c
@@ -329,6 +329,30 @@ static void llvm_emit_epilogue(struct lp_build_tgsi_context * bld_base)
 				break;
 			}
 			}
+			if (!next_param) {
+				//Dummy export
+				LLVMValueRef args[3];
+				args[0] = LLVMGetUndef(LLVMVectorType(bld_base->base.elem_type, 4));
+				args[1] = lp_build_const_int32(base->gallivm, 0);
+				args[2] = lp_build_const_int32(base->gallivm, V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_PARAM);
+				build_intrinsic(
+					base->gallivm->builder,
+					"llvm.R600.store.swizzle",
+					LLVMVoidTypeInContext(base->gallivm->context),
+					args, 3, 0);
+			}
+			if (!next_pos) {
+				//Dummy export
+				LLVMValueRef args[3];
+				args[0] = LLVMGetUndef(LLVMVectorType(bld_base->base.elem_type, 4));
+				args[1] = lp_build_const_int32(base->gallivm, 0);
+				args[2] = lp_build_const_int32(base->gallivm, V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_POS);
+				build_intrinsic(
+					base->gallivm->builder,
+					"llvm.R600.store.swizzle",
+					LLVMVoidTypeInContext(base->gallivm->context),
+					args, 3, 0);
+				}
 		} else if (ctx->type == TGSI_PROCESSOR_FRAGMENT) {
 			switch (ctx->r600_outputs[i].name) {
 			case TGSI_SEMANTIC_COLOR:
@@ -373,10 +397,20 @@ static void llvm_emit_epilogue(struct lp_build_tgsi_context * bld_base)
 				break;
 			}
 		}
+		if (!has_color) {
+			//Dummy export
+			LLVMValueRef args[3];
+			args[0] = LLVMGetUndef(LLVMVectorType(bld_base->base.elem_type, 4));
+			args[1] = lp_build_const_int32(base->gallivm, 0);
+			args[2] = lp_build_const_int32(base->gallivm, V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_PIXEL);
+			build_intrinsic(
+				base->gallivm->builder,
+				"llvm.R600.store.swizzle",
+				LLVMVoidTypeInContext(base->gallivm->context),
+				args, 3, 0);
+			}
 	}
 
-	if (!has_color && ctx->type == TGSI_PROCESSOR_FRAGMENT)
-		lp_build_intrinsic(base->gallivm->builder, "llvm.R600.store.pixel.dummy", LLVMVoidTypeInContext(base->gallivm->context), 0, 0);
 }
 
 static void llvm_emit_tex(
-- 
1.8.1



More information about the mesa-dev mailing list