r600g,radeonsi: don't skip the context flush if a fence should be returned
[mesa.git] / src / gallium / drivers / radeonsi / si_state.c
index 6c345ff3a4487d6db51521ed101a29980a1d16d4..ab9c4cc28342fa610b37f827be2908b6625a8a80 100644 (file)
@@ -1705,7 +1705,7 @@ static void si_init_depth_surface(struct si_context *sctx,
        unsigned macro_aspect, tile_split, stile_split, bankh, bankw, nbanks, pipe_config;
        uint32_t z_info, s_info, db_depth_info;
        uint64_t z_offs, s_offs;
-       uint32_t db_htile_data_base, db_htile_surface, pa_su_poly_offset_db_fmt_cntl;
+       uint32_t db_htile_data_base, db_htile_surface, pa_su_poly_offset_db_fmt_cntl = 0;
 
        switch (sctx->framebuffer.state.zsbuf->texture->format) {
        case PIPE_FORMAT_S8_UINT_Z24_UNORM:
@@ -2208,9 +2208,11 @@ static void si_bind_ps_shader(struct pipe_context *ctx, void *state)
        struct si_context *sctx = (struct si_context *)ctx;
        struct si_pipe_shader_selector *sel = state;
 
+       /* skip if supplied shader is one already in use */
        if (sctx->ps_shader == sel)
                return;
 
+       /* use dummy shader if supplied shader is corrupt */
        if (!sel || !sel->current)
                sel = sctx->dummy_pixel_shader;