diff options
author | Vadim Girlin <[email protected]> | 2012-05-15 18:53:06 +0400 |
---|---|---|
committer | Vadim Girlin <[email protected]> | 2012-05-15 18:53:06 +0400 |
commit | fa5a963dd6c2622c416d53e49b08c4b3cbce7483 (patch) | |
tree | 57d3fdfb66c953c1cbfffe8642cf4b478b22aa90 /src/gallium/drivers/r600 | |
parent | b655f78b25454e00f4300fb5ccd35b3d0ab8a740 (diff) |
radeon/llvm: add SET_GRADIENTS*, fix SAMPLE_G
Signed-off-by: Vadim Girlin <[email protected]>
Reviewed-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r-- | src/gallium/drivers/r600/r600_llvm.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/r600/r600_llvm.c index adcc24f0ca3..2ca838f87fa 100644 --- a/src/gallium/drivers/r600/r600_llvm.c +++ b/src/gallium/drivers/r600/r600_llvm.c @@ -5,6 +5,7 @@ #include "gallivm/lp_bld_gather.h" #include "tgsi/tgsi_parse.h" #include "util/u_double_list.h" +#include "util/u_memory.h" #include "r600.h" #include "r600_asm.h" @@ -142,16 +143,22 @@ static void llvm_emit_tex( struct lp_build_emit_data * emit_data) { struct gallivm_state * gallivm = bld_base->base.gallivm; - LLVMValueRef args[3]; + LLVMValueRef args[6]; + unsigned c; - args[0] = emit_data->args[0]; - args[1] = lp_build_const_int32(gallivm, + assert(emit_data->arg_count + 2 <= Elements(args)); + + for (c = 0; c < emit_data->arg_count; ++c) + args[c] = emit_data->args[c]; + + args[c++] = lp_build_const_int32(gallivm, emit_data->inst->Src[1].Register.Index); - args[2] = lp_build_const_int32(gallivm, + args[c++] = lp_build_const_int32(gallivm, emit_data->inst->Texture.Texture); + emit_data->output[0] = build_intrinsic(gallivm->builder, action->intr_name, - emit_data->dst_type, args, 3, LLVMReadNoneAttribute); + emit_data->dst_type, args, c, LLVMReadNoneAttribute); } static void dp_fetch_args( |