[Mesa-dev] [PATCH 09/11] radeonsi: lp_type::length is always 1
Marek Olšák
maraeo at gmail.com
Fri Sep 29 14:49:53 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
index 87f51a8..5c397f7 100644
--- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
+++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
@@ -399,21 +399,21 @@ get_pointer_into_array(struct si_shader_context *ctx,
LLVMValueRef
si_llvm_emit_fetch_64bit(struct lp_build_tgsi_context *bld_base,
enum tgsi_opcode_type type,
LLVMValueRef ptr,
LLVMValueRef ptr2)
{
struct si_shader_context *ctx = si_shader_context(bld_base);
LLVMValueRef result;
- result = LLVMGetUndef(LLVMVectorType(ctx->i32, bld_base->base.type.length * 2));
+ result = LLVMGetUndef(LLVMVectorType(ctx->i32, 2));
result = LLVMBuildInsertElement(ctx->ac.builder,
result,
ac_to_integer(&ctx->ac, ptr),
ctx->i32_0, "");
result = LLVMBuildInsertElement(ctx->ac.builder,
result,
ac_to_integer(&ctx->ac, ptr2),
ctx->i32_1, "");
return bitcast(bld_base, type, result);
@@ -569,21 +569,21 @@ LLVMValueRef si_llvm_emit_fetch(struct lp_build_tgsi_context *bld_base,
if (reg->Register.Indirect) {
LLVMValueRef load = load_value_from_array(bld_base, reg->Register.File, type,
swizzle, reg->Register.Index, ®->Indirect);
return bitcast(bld_base, type, load);
}
switch(reg->Register.File) {
case TGSI_FILE_IMMEDIATE: {
LLVMTypeRef ctype = tgsi2llvmtype(bld_base, type);
if (tgsi_type_is_64bit(type)) {
- result = LLVMGetUndef(LLVMVectorType(ctx->i32, bld_base->base.type.length * 2));
+ result = LLVMGetUndef(LLVMVectorType(ctx->i32, 2));
result = LLVMConstInsertElement(result,
ctx->imms[reg->Register.Index * TGSI_NUM_CHANNELS + swizzle],
ctx->i32_0);
result = LLVMConstInsertElement(result,
ctx->imms[reg->Register.Index * TGSI_NUM_CHANNELS + swizzle + 1],
ctx->i32_1);
return LLVMConstBitCast(result, ctype);
} else {
return LLVMConstBitCast(ctx->imms[reg->Register.Index * TGSI_NUM_CHANNELS + swizzle], ctype);
}
--
2.7.4
More information about the mesa-dev
mailing list