[Mesa-dev] [PATCH 3/6] gallium/radeon: simplify initialization of 64-bit gallivm builders
Marek Olšák
maraeo at gmail.com
Mon Oct 17 13:44:08 UTC 2016
From: Marek Olšák <marek.olsak at amd.com>
---
.../drivers/radeon/radeon_setup_tgsi_llvm.c | 22 ++++------------------
1 file changed, 4 insertions(+), 18 deletions(-)
diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
index 2d424d5..c06eb3e 100644
--- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
+++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
@@ -1061,38 +1061,24 @@ void radeon_llvm_context_init(struct radeon_llvm_context *ctx, const char *tripl
type.floating = true;
type.fixed = false;
type.sign = true;
type.norm = false;
type.width = 32;
type.length = 1;
lp_build_context_init(&bld_base->base, &ctx->gallivm, type);
lp_build_context_init(&ctx->soa.bld_base.uint_bld, &ctx->gallivm, lp_uint_type(type));
lp_build_context_init(&ctx->soa.bld_base.int_bld, &ctx->gallivm, lp_int_type(type));
- {
- struct lp_type dbl_type;
- dbl_type = type;
- dbl_type.width *= 2;
- lp_build_context_init(&ctx->soa.bld_base.dbl_bld, &ctx->gallivm, dbl_type);
- }
- {
- struct lp_type dtype;
- dtype = lp_uint_type(type);
- dtype.width *= 2;
- lp_build_context_init(&ctx->soa.bld_base.uint64_bld, &ctx->gallivm, dtype);
- }
- {
- struct lp_type dtype;
- dtype = lp_int_type(type);
- dtype.width *= 2;
- lp_build_context_init(&ctx->soa.bld_base.int64_bld, &ctx->gallivm, dtype);
- }
+ type.width *= 2;
+ lp_build_context_init(&ctx->soa.bld_base.dbl_bld, &ctx->gallivm, type);
+ lp_build_context_init(&ctx->soa.bld_base.uint64_bld, &ctx->gallivm, lp_uint_type(type));
+ lp_build_context_init(&ctx->soa.bld_base.int64_bld, &ctx->gallivm, lp_int_type(type));
bld_base->soa = 1;
bld_base->emit_store = radeon_llvm_emit_store;
bld_base->emit_swizzle = emit_swizzle;
bld_base->emit_declaration = emit_declaration;
bld_base->emit_immediate = emit_immediate;
bld_base->emit_fetch_funcs[TGSI_FILE_IMMEDIATE] = radeon_llvm_emit_fetch;
bld_base->emit_fetch_funcs[TGSI_FILE_INPUT] = radeon_llvm_emit_fetch;
bld_base->emit_fetch_funcs[TGSI_FILE_TEMPORARY] = radeon_llvm_emit_fetch;
--
2.7.4
More information about the mesa-dev
mailing list