summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-09-19 16:19:44 +0200
committerMarek Olšák <[email protected]>2014-09-24 14:48:02 +0200
commita34c9f70b1f64b8802d22114900475e520b143e6 (patch)
tree41dd72d2207e610e170319a80a72d1a2a83674da /src/gallium
parent884f1654e22c2845b388560b297a7c440a68e594 (diff)
radeonsi: remove shader.ps_conservative_z, set db_shader_control instead
Also set the field on SI too. It's not just specific to CIK. Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c7
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.h1
-rw-r--r--src/gallium/drivers/radeonsi/si_state_draw.c4
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 0a5ed960a86..19dc9ca6d73 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 df7dbb0241b..e07d872f84c 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 fb1ddc09f08..37dc40b19b3 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);