summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-07-14 19:40:14 +0200
committerMarek Olšák <[email protected]>2014-07-14 21:40:19 +0200
commitd859bdb4b5beee8059d3e5c0f789dd8ae4061c4a (patch)
tree6bed22d51024ae6b4cc002bfa65e9a77188917fe /src/gallium
parent130c99ca1538dc6320c6ed14ac8aff84b8e6b135 (diff)
radeonsi: partially revert "switch descriptors to i32 vectors"
It indeed breaks LLVM 3.4.2.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 9ff08a59dfa..563365b48e8 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -1989,6 +1989,7 @@ static void build_tex_intrinsic(const struct lp_build_tgsi_action * action,
emit_data->args, emit_data->arg_count,
LLVMReadNoneAttribute | LLVMNoUnwindAttribute);
} else {
+ LLVMTypeRef i8, v16i8, v32i8;
const char *name;
switch (opcode) {
@@ -2016,6 +2017,17 @@ static void build_tex_intrinsic(const struct lp_build_tgsi_action * action,
return;
}
+ i8 = LLVMInt8TypeInContext(base->gallivm->context);
+ v16i8 = LLVMVectorType(i8, 16);
+ v32i8 = LLVMVectorType(i8, 32);
+
+ emit_data->args[1] = LLVMBuildBitCast(base->gallivm->builder,
+ emit_data->args[1], v32i8, "");
+ if (opcode != TGSI_OPCODE_TXF) {
+ emit_data->args[2] = LLVMBuildBitCast(base->gallivm->builder,
+ emit_data->args[2], v16i8, "");
+ }
+
sprintf(intr_name, "%s.v%ui32", name,
LLVMGetVectorSize(LLVMTypeOf(emit_data->args[0])));