diff options
author | Marek Olšák <[email protected]> | 2016-10-26 13:42:28 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-11-01 22:33:13 +0100 |
commit | bf4d102ea3419ade6759bf9c3ad9d40c7f9b3c27 (patch) | |
tree | 89a7e131083234d508a15bb045c16d9633d461d3 /src/gallium/drivers/radeonsi | |
parent | e9c76eeeaa673331fec6056a4baa30095de42f5e (diff) |
gallium/radeon: add radeon_surf::is_linear
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_blit.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index fe17f739242..0fd1106d59b 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -1012,7 +1012,7 @@ static bool do_hardware_msaa_resolve(struct pipe_context *ctx, info->src.box.width == dst_width && info->src.box.height == dst_height && info->src.box.depth == 1 && - dst->surface.level[info->dst.level].mode >= RADEON_SURF_MODE_1D && + !dst->surface.is_linear && (!dst->cmask.size || !dst->dirty_level_mask)) { /* dst cannot be fast-cleared */ /* Check the last constraint. */ if (src->surface.micro_tile_mode != dst->surface.micro_tile_mode) { @@ -1116,8 +1116,7 @@ static void si_blit(struct pipe_context *ctx, * resource_copy_region can't do this yet, because dma_copy calls it * on failure (recursion). */ - if (rdst->surface.level[info->dst.level].mode == - RADEON_SURF_MODE_LINEAR_ALIGNED && + if (rdst->surface.is_linear && sctx->b.dma_copy && util_can_blit_via_copy_region(info, false)) { sctx->b.dma_copy(ctx, info->dst.resource, info->dst.level, diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index bf89d8bf1f2..ab3397c5f19 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2360,7 +2360,7 @@ static void si_set_framebuffer_state(struct pipe_context *ctx, sctx->framebuffer.compressed_cb_mask |= 1 << i; } - if (surf->level_info->mode == RADEON_SURF_MODE_LINEAR_ALIGNED) + if (rtex->surface.is_linear) sctx->framebuffer.any_dst_linear = true; r600_context_add_resource_size(ctx, surf->base.texture); |