[Mesa-dev] [PATCH 04/10] radeonsi: remove unused si_llvm_cube_to_2d_coords
Nicolai Hähnle
nhaehnle at gmail.com
Tue Jan 10 15:12:16 UTC 2017
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c | 28 -----------------------
1 file changed, 28 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c
index fb2c7dc..4021800 100644
--- a/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c
+++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c
@@ -1008,48 +1008,20 @@ static void build_cube_select(LLVMBuilderRef builder,
out_st[1] = LLVMBuildFMul(builder, tmp, sgn, "");
/* Select ma */
tmp = LLVMBuildSelect(builder, is_ma_z, coords[2],
LLVMBuildSelect(builder, is_ma_y, coords[1], coords[0], ""), "");
sgn = LLVMBuildSelect(builder, is_ma_positive,
LLVMConstReal(f32, 2.0), LLVMConstReal(f32, -2.0), "");
*out_ma = LLVMBuildFMul(builder, tmp, sgn, "");
}
-static void si_llvm_cube_to_2d_coords(struct lp_build_tgsi_context *bld_base,
- LLVMValueRef *in, LLVMValueRef *out)
-{
- struct gallivm_state *gallivm = bld_base->base.gallivm;
- LLVMBuilderRef builder = gallivm->builder;
- LLVMTypeRef type = bld_base->base.elem_type;
- struct cube_selection_coords coords;
- LLVMValueRef invma;
- LLVMValueRef mad_args[3];
-
- build_cube_intrinsic(gallivm, in, &coords);
-
- invma = lp_build_intrinsic(builder, "llvm.fabs.f32",
- type, &coords.ma, 1, LP_FUNC_ATTR_READNONE);
- invma = lp_build_emit_llvm_unary(bld_base, TGSI_OPCODE_RCP, invma);
-
- mad_args[1] = invma;
- mad_args[2] = LLVMConstReal(type, 0.5);
-
- for (int i = 0; i < 2; ++i) {
- mad_args[0] = coords.stc[i];
- out[i] = lp_build_emit_llvm_ternary(bld_base, TGSI_OPCODE_MAD,
- mad_args[0], mad_args[1], mad_args[2]);
- }
-
- out[2] = coords.id;
-}
-
void si_prepare_cube_coords(struct lp_build_tgsi_context *bld_base,
struct lp_build_emit_data *emit_data,
LLVMValueRef *coords_arg,
LLVMValueRef *derivs_arg)
{
unsigned target = emit_data->inst->Texture.Texture;
unsigned opcode = emit_data->inst->Instruction.Opcode;
struct gallivm_state *gallivm = bld_base->base.gallivm;
LLVMBuilderRef builder = gallivm->builder;
--
2.7.4
More information about the mesa-dev
mailing list