[Mesa-dev] [PATCH 05/15] radeonsi: set KILL_ENABLE during shader compilation, remove uses_kill flag
Marek Olšák
maraeo at gmail.com
Fri Sep 19 13:17:08 PDT 2014
From: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/drivers/radeonsi/si_shader.c | 6 +++++-
src/gallium/drivers/radeonsi/si_shader.h | 1 -
src/gallium/drivers/radeonsi/si_state_draw.c | 3 ---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 19dc9ca..5893531 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -774,6 +774,8 @@ static void si_alpha_test(struct lp_build_tgsi_context *bld_base,
LLVMVoidTypeInContext(gallivm->context),
NULL, 0, 0);
}
+
+ si_shader_ctx->shader->db_shader_control |= S_02880C_KILL_ENABLE(1);
}
static void si_llvm_emit_clipvertex(struct lp_build_tgsi_context * bld_base,
@@ -2751,7 +2753,9 @@ int si_pipe_shader_create(
tgsi_scan_shader(sel->tokens, &shader_info);
- shader->shader.uses_kill = shader_info.uses_kill;
+ if (shader_info.uses_kill)
+ shader->db_shader_control |= S_02880C_KILL_ENABLE(1);
+
shader->shader.uses_instanceid = shader_info.uses_instanceid;
bld_base->info = &shader_info;
bld_base->emit_fetch_funcs[TGSI_FILE_CONSTANT] = fetch_constant;
diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h
index e07d872..559e4e2 100644
--- a/src/gallium/drivers/radeonsi/si_shader.h
+++ b/src/gallium/drivers/radeonsi/si_shader.h
@@ -142,7 +142,6 @@ struct si_shader {
unsigned gs_max_out_vertices;
unsigned nparam;
- bool uses_kill;
bool uses_instanceid;
bool fs_write_all;
bool vs_out_misc_write;
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
index 37dc40b..28e92fc 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -266,9 +266,6 @@ static void si_pipe_shader_ps(struct pipe_context *ctx, struct si_pipe_shader *s
db_shader_control |= shader->db_shader_control;
- if (shader->shader.uses_kill || shader->key.ps.alpha_func != PIPE_FUNC_ALWAYS)
- db_shader_control |= S_02880C_KILL_ENABLE(1);
-
spi_ps_in_control = S_0286D8_NUM_INTERP(shader->shader.nparam) |
S_0286D8_BC_OPTIMIZE_DISABLE(1);
--
1.9.1
More information about the mesa-dev
mailing list