[Mesa-dev] [PATCH] r600g/llvm: Fix for bug 59588 (llvm rv780 etqw gpu lock
Tom Stellard
tom at stellard.net
Thu Jan 24 07:19:44 PST 2013
Hi Vincent,
For bug fixes, the Mesa convention is to use a normal commit message describing
what the change does and then put a link to the bug at the end of the
message. See for example:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=728bf86a23f6de137c0871ea87b09e75e55468a9
On Thu, Jan 24, 2013 at 04:07:19PM +0100, Vincent Lejeune wrote:
> ---
> 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
Can you use C style comments here /* */ and other places in this patch.
> + 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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list