radeonsi: set DEPTH_BEFORE_SHADER based on FS_EARLY_DEPTH_STENCIL
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 11 Mar 2016 23:20:00 +0000 (18:20 -0500)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 14 Mar 2016 22:24:59 +0000 (17:24 -0500)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_state_shaders.c

index 321b87d..5fe1f79 100644 (file)
@@ -1154,6 +1154,9 @@ static void *si_create_shader_selector(struct pipe_context *ctx,
                break;
        }
 
+       if (sel->info.properties[TGSI_PROPERTY_FS_EARLY_DEPTH_STENCIL])
+               sel->db_shader_control |= S_02880C_DEPTH_BEFORE_SHADER(1);
+
        /* Compile the main shader part for use with a prolog and/or epilog. */
        if (sel->type != PIPE_SHADER_GEOMETRY &&
            !sscreen->use_monolithic_shaders) {