radeonsi: remove shader.ps_conservative_z, set db_shader_control instead
authorMarek Olšák <marek.olsak@amd.com>
Fri, 19 Sep 2014 14:19:44 +0000 (16:19 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 24 Sep 2014 12:48:02 +0000 (14:48 +0200)
Also set the field on SI too. It's not just specific to CIK.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader.h
src/gallium/drivers/radeonsi/si_state_draw.c

index 0a5ed960a86937fff4e82a0d20baa466b300292b..19dc9ca6d73aa378d5b416f8bf20f41b18b02cde 100644 (file)
@@ -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;
index df7dbb0241b2af4a89882dabc21d41652689f8fa..e07d872f84c4cf25c241c4344eebe966c173c133 100644 (file)
@@ -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;
index fb1ddc09f084bc20d271537c8a960fbdc7323216..37dc40b19b32f9e29cf38c6170adab9ae2494c1f 100644 (file)
@@ -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);