[Mesa-dev] [PATCH 04/15] radeonsi: remove shader.ps_conservative_z, set db_shader_control instead
Marek Olšák
maraeo at gmail.com
Fri Sep 19 13:17:07 PDT 2014
From: Marek Olšák <marek.olsak at amd.com>
Also set the field on SI too. It's not just specific to CIK.
---
src/gallium/drivers/radeonsi/si_shader.c | 7 ++++---
src/gallium/drivers/radeonsi/si_shader.h | 1 -
src/gallium/drivers/radeonsi/si_state_draw.c | 4 ----
3 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 0a5ed96..19dc9ca 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -2818,17 +2818,18 @@ int si_pipe_shader_create(
si_shader_ctx.radeon_bld.load_input = declare_input_fs;
bld_base->emit_epilogue = si_llvm_emit_fs_epilogue;
- shader->shader.ps_conservative_z = V_02880C_EXPORT_ANY_Z;
for (i = 0; i < shader_info.num_properties; i++) {
switch (shader_info.properties[i].name) {
case TGSI_PROPERTY_FS_DEPTH_LAYOUT:
switch (shader_info.properties[i].data[0]) {
case TGSI_FS_DEPTH_LAYOUT_GREATER:
- shader->shader.ps_conservative_z = V_02880C_EXPORT_GREATER_THAN_Z;
+ shader->db_shader_control |=
+ S_02880C_CONSERVATIVE_Z_EXPORT(V_02880C_EXPORT_GREATER_THAN_Z);
break;
case TGSI_FS_DEPTH_LAYOUT_LESS:
- shader->shader.ps_conservative_z = V_02880C_EXPORT_LESS_THAN_Z;
+ shader->db_shader_control |=
+ S_02880C_CONSERVATIVE_Z_EXPORT(V_02880C_EXPORT_LESS_THAN_Z);
break;
}
break;
diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h
index df7dbb0..e07d872 100644
--- a/src/gallium/drivers/radeonsi/si_shader.h
+++ b/src/gallium/drivers/radeonsi/si_shader.h
@@ -140,7 +140,6 @@ struct si_shader {
unsigned gs_input_prim;
unsigned gs_output_prim;
unsigned gs_max_out_vertices;
- unsigned ps_conservative_z;
unsigned nparam;
bool uses_kill;
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
index fb1ddc0..37dc40b 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -269,10 +269,6 @@ static void si_pipe_shader_ps(struct pipe_context *ctx, struct si_pipe_shader *s
if (shader->shader.uses_kill || shader->key.ps.alpha_func != PIPE_FUNC_ALWAYS)
db_shader_control |= S_02880C_KILL_ENABLE(1);
- if (sctx->b.chip_class >= CIK)
- db_shader_control |=
- S_02880C_CONSERVATIVE_Z_EXPORT(shader->shader.ps_conservative_z);
-
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