diff options
author | Marek Olšák <[email protected]> | 2015-09-06 17:35:06 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-10-03 22:06:08 +0200 |
commit | 5804c6adf8361adb5d04feaf578dffbf840475d6 (patch) | |
tree | 87662fcbbae35b0378da4c7ba217733bd5a35d62 /src/gallium/drivers/radeonsi | |
parent | cc92b9037507ccfb498bdcec27b4d186e230004f (diff) |
gallium/radeon: add separate stencil level dirty flags
We will only do depth-only or stencil-only decompress blits, whichever is
needed by textures, instead of always doing both.
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/cik_sdma.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_dma.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_draw.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/cik_sdma.c b/src/gallium/drivers/radeonsi/cik_sdma.c index 691d379bccd..6454b8ce8c0 100644 --- a/src/gallium/drivers/radeonsi/cik_sdma.c +++ b/src/gallium/drivers/radeonsi/cik_sdma.c @@ -242,7 +242,7 @@ void cik_sdma_copy(struct pipe_context *ctx, if (src->format != dst->format || rdst->surface.nsamples > 1 || rsrc->surface.nsamples > 1 || - rdst->dirty_level_mask & (1 << dst_level)) { + (rdst->dirty_level_mask | rdst->stencil_dirty_level_mask) & (1 << dst_level)) { goto fallback; } diff --git a/src/gallium/drivers/radeonsi/si_dma.c b/src/gallium/drivers/radeonsi/si_dma.c index 3d980fb67b8..31b0b41e5a4 100644 --- a/src/gallium/drivers/radeonsi/si_dma.c +++ b/src/gallium/drivers/radeonsi/si_dma.c @@ -246,13 +246,13 @@ void si_dma_copy(struct pipe_context *ctx, goto fallback; if (src->format != dst->format || src_box->depth > 1 || - rdst->dirty_level_mask != 0 || + (rdst->dirty_level_mask | rdst->stencil_dirty_level_mask) & (1 << dst_level) || rdst->cmask.size || rdst->fmask.size || rsrc->cmask.size || rsrc->fmask.size) { goto fallback; } - if (rsrc->dirty_level_mask) { + if (rsrc->dirty_level_mask & (1 << src_level)) { ctx->flush_resource(ctx, src); } diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index fb65eb3ce2d..43170ec446b 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -858,6 +858,9 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) struct r600_texture *rtex = (struct r600_texture *)surf->texture; rtex->dirty_level_mask |= 1 << surf->u.tex.level; + + if (rtex->surface.flags & RADEON_SURF_SBUFFER) + rtex->stencil_dirty_level_mask |= 1 << surf->u.tex.level; } if (sctx->framebuffer.compressed_cb_mask) { struct pipe_surface *surf; |