From 6f193d92558023dd0843ce20557a207c890d435c Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Wed, 23 Jan 2013 17:00:38 +0100 Subject: [PATCH] Add dummy export for vs --- src/gallium/drivers/r600/r600_llvm.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/r600/r600_llvm.c index 0f0eb84..08deb48 100644 --- a/src/gallium/drivers/r600/r600_llvm.c +++ b/src/gallium/drivers/r600/r600_llvm.c @@ -18,7 +18,7 @@ #include -#if defined R600_USE_LLVM || defined HAVE_OPENCL +//#if defined R600_USE_LLVM || defined HAVE_OPENCL #define CONSTANT_BUFFER_0_ADDR_SPACE 9 @@ -387,6 +387,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: @@ -642,4 +666,4 @@ unsigned r600_llvm_compile( gpu_family, dump); } -#endif +//#endif -- 1.8.1