From: Marek Olšák Date: Fri, 19 Sep 2014 14:19:44 +0000 (+0200) Subject: radeonsi: remove shader.ps_conservative_z, set db_shader_control instead X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a34c9f70b1f64b8802d22114900475e520b143e6;p=mesa.git 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 --- 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);