You might be interested with https://hastebin.com/vekuhojapo.
I have patches that do the same optimization for RADV, and my pipeline
stats are quite similar.
No regressions detected with CTS.
Series is:
Reviewed-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
On 01/30/2018 10:46 PM, Marek Olšák wrote:
From: Marek Olšák <marek.ol...@amd.com>
---
src/gallium/drivers/radeonsi/si_shader_internal.h | 4 ----
src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 7 -------
2 files changed, 11 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader_internal.h
b/src/gallium/drivers/radeonsi/si_shader_internal.h
index 3084d88..1fc42df 100644
--- a/src/gallium/drivers/radeonsi/si_shader_internal.h
+++ b/src/gallium/drivers/radeonsi/si_shader_internal.h
@@ -184,24 +184,20 @@ struct si_shader_context {
int param_gs_vtx23_offset; /* in dwords (GFX9) */
int param_gs_vtx45_offset; /* in dwords (GFX9) */
/* CS */
int param_grid_size;
int param_block_size;
int param_block_id[3];
int param_thread_id;
LLVMTargetMachineRef tm;
- unsigned range_md_kind;
- unsigned fpmath_md_kind;
- LLVMValueRef fpmath_md_2p5_ulp;
-
/* Preloaded descriptors. */
LLVMValueRef esgs_ring;
LLVMValueRef gsvs_ring[4];
LLVMValueRef invoc0_tess_factors[6]; /* outer[4], inner[2] */
LLVMValueRef gs_next_vertex[4];
LLVMValueRef postponed_kill;
LLVMValueRef return_value;
LLVMTypeRef voidt;
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
index fc141ca..f70e2bd 100644
--- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
+++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
@@ -1187,27 +1187,20 @@ void si_llvm_context_init(struct si_shader_context *ctx,
type.width *= 2;
lp_build_context_init(&ctx->bld_base.dbl_bld, &ctx->gallivm, type);
lp_build_context_init(&ctx->bld_base.uint64_bld, &ctx->gallivm,
lp_uint_type(type));
lp_build_context_init(&ctx->bld_base.int64_bld, &ctx->gallivm,
lp_int_type(type));
bld_base->soa = 1;
bld_base->emit_swizzle = emit_swizzle;
bld_base->emit_declaration = emit_declaration;
bld_base->emit_immediate = emit_immediate;
- /* metadata allowing 2.5 ULP */
- ctx->fpmath_md_kind = LLVMGetMDKindIDInContext(ctx->ac.context,
- "fpmath", 6);
- LLVMValueRef arg = LLVMConstReal(ctx->ac.f32, 2.5);
- ctx->fpmath_md_2p5_ulp = LLVMMDNodeInContext(ctx->ac.context,
- &arg, 1);
-
bld_base->op_actions[TGSI_OPCODE_BGNLOOP].emit = bgnloop_emit;
bld_base->op_actions[TGSI_OPCODE_BRK].emit = brk_emit;
bld_base->op_actions[TGSI_OPCODE_CONT].emit = cont_emit;
bld_base->op_actions[TGSI_OPCODE_IF].emit = if_emit;
bld_base->op_actions[TGSI_OPCODE_UIF].emit = uif_emit;
bld_base->op_actions[TGSI_OPCODE_ELSE].emit = else_emit;
bld_base->op_actions[TGSI_OPCODE_ENDIF].emit = endif_emit;
bld_base->op_actions[TGSI_OPCODE_ENDLOOP].emit = endloop_emit;
si_shader_context_init_alu(&ctx->bld_base);
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev