From: Marek Olšák <marek.ol...@amd.com> --- src/gallium/drivers/radeon/r600_pipe_common.h | 2 +- src/gallium/drivers/radeon/r600_texture.c | 4 ++-- src/gallium/drivers/radeonsi/si_blit.c | 10 +++++----- src/gallium/drivers/radeonsi/si_state.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index 53fce50..035ab1c 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -784,21 +784,21 @@ void r600_texture_get_cmask_info(struct r600_common_screen *rscreen, struct r600_texture *rtex, struct r600_cmask_info *out); bool r600_init_flushed_depth_texture(struct pipe_context *ctx, struct pipe_resource *texture, struct r600_texture **staging); void r600_print_texture_info(struct r600_texture *rtex, FILE *f); struct pipe_resource *r600_texture_create(struct pipe_screen *screen, const struct pipe_resource *templ); bool vi_dcc_formats_compatible(enum pipe_format format1, enum pipe_format format2); -void vi_dcc_disable_if_incompatible_format(struct r600_common_context *rctx, +void vi_disable_dcc_if_incompatible_format(struct r600_common_context *rctx, struct pipe_resource *tex, unsigned level, enum pipe_format view_format); struct pipe_surface *r600_create_surface_custom(struct pipe_context *pipe, struct pipe_resource *texture, const struct pipe_surface *templ, unsigned width, unsigned height); unsigned r600_translate_colorswap(enum pipe_format format, bool do_endian_swap); void vi_separate_dcc_start_query(struct pipe_context *ctx, struct r600_texture *tex); diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 94024c8..783f50c 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -1733,21 +1733,21 @@ bool vi_dcc_formats_compatible(enum pipe_format format1, return false; type1 = vi_get_dcc_channel_type(desc1); type2 = vi_get_dcc_channel_type(desc2); return type1 != dcc_channel_incompatible && type2 != dcc_channel_incompatible && type1 == type2; } -void vi_dcc_disable_if_incompatible_format(struct r600_common_context *rctx, +void vi_disable_dcc_if_incompatible_format(struct r600_common_context *rctx, struct pipe_resource *tex, unsigned level, enum pipe_format view_format) { struct r600_texture *rtex = (struct r600_texture *)tex; if (vi_dcc_enabled(rtex, level) && !vi_dcc_formats_compatible(tex->format, view_format)) if (!r600_texture_disable_dcc(rctx, (struct r600_texture*)tex)) rctx->decompress_dcc(&rctx->b, rtex); @@ -1769,21 +1769,21 @@ struct pipe_surface *r600_create_surface_custom(struct pipe_context *pipe, pipe_reference_init(&surface->base.reference, 1); pipe_resource_reference(&surface->base.texture, texture); surface->base.context = pipe; surface->base.format = templ->format; surface->base.width = width; surface->base.height = height; surface->base.u = templ->u; if (texture->target != PIPE_BUFFER) - vi_dcc_disable_if_incompatible_format(rctx, texture, + vi_disable_dcc_if_incompatible_format(rctx, texture, templ->u.tex.level, templ->format); return &surface->base; } static struct pipe_surface *r600_create_surface(struct pipe_context *pipe, struct pipe_resource *tex, const struct pipe_surface *templ) { diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index ded8beb..06a28f4 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -934,23 +934,23 @@ void si_resource_copy_region(struct pipe_context *ctx, src_templ.format = PIPE_FORMAT_R32G32B32A32_UINT; break; default: fprintf(stderr, "Unhandled format %s with blocksize %u\n", util_format_short_name(src->format), blocksize); assert(0); } } } - vi_dcc_disable_if_incompatible_format(&sctx->b, dst, dst_level, + vi_disable_dcc_if_incompatible_format(&sctx->b, dst, dst_level, dst_templ.format); - vi_dcc_disable_if_incompatible_format(&sctx->b, src, src_level, + vi_disable_dcc_if_incompatible_format(&sctx->b, src, src_level, src_templ.format); /* Initialize the surface. */ dst_view = r600_create_surface_custom(ctx, dst, &dst_templ, dst_width, dst_height); /* Initialize the sampler view. */ src_view = si_create_sampler_view_custom(ctx, src, &src_templ, src_width0, src_height0, src_force_level); @@ -1130,24 +1130,24 @@ static void si_blit(struct pipe_context *ctx, info->dst.box.z, info->src.resource, info->src.level, &info->src.box); return; } assert(util_blitter_is_blit_supported(sctx->blitter, info)); /* The driver doesn't decompress resources automatically while * u_blitter is rendering. */ - vi_dcc_disable_if_incompatible_format(&sctx->b, info->src.resource, + vi_disable_dcc_if_incompatible_format(&sctx->b, info->src.resource, info->src.level, info->src.format); - vi_dcc_disable_if_incompatible_format(&sctx->b, info->dst.resource, + vi_disable_dcc_if_incompatible_format(&sctx->b, info->dst.resource, info->dst.level, info->dst.format); si_decompress_subresource(ctx, info->src.resource, info->mask, info->src.level, info->src.box.z, info->src.box.z + info->src.box.depth - 1); if (sctx->screen->b.debug_flags & DBG_FORCE_DMA && util_try_blit_via_copy_region(ctx, info)) return; @@ -1165,21 +1165,21 @@ static boolean si_generate_mipmap(struct pipe_context *ctx, unsigned first_layer, unsigned last_layer) { struct si_context *sctx = (struct si_context*)ctx; struct r600_texture *rtex = (struct r600_texture *)tex; if (!util_blitter_is_copy_supported(sctx->blitter, tex, tex)) return false; /* The driver doesn't decompress resources automatically while * u_blitter is rendering. */ - vi_dcc_disable_if_incompatible_format(&sctx->b, tex, base_level, + vi_disable_dcc_if_incompatible_format(&sctx->b, tex, base_level, format); si_decompress_subresource(ctx, tex, PIPE_MASK_RGBAZS, base_level, first_layer, last_layer); /* Clear dirty_level_mask for the levels that will be overwritten. */ assert(base_level < last_level); rtex->dirty_level_mask &= ~u_bit_consecutive(base_level + 1, last_level - base_level); si_blitter_begin(ctx, SI_BLIT | SI_DISABLE_RENDER_COND); diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index eed7752..9461a1c 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -3159,21 +3159,21 @@ si_create_sampler_view_custom(struct pipe_context *ctx, case PIPE_FORMAT_X24S8_UINT: case PIPE_FORMAT_S8X24_UINT: case PIPE_FORMAT_X32_S8X24_UINT: pipe_format = PIPE_FORMAT_S8_UINT; surflevel = tmp->surface.stencil_level; break; default:; } } - vi_dcc_disable_if_incompatible_format(&sctx->b, texture, + vi_disable_dcc_if_incompatible_format(&sctx->b, texture, state->u.tex.first_level, state->format); si_make_texture_descriptor(sctx->screen, tmp, true, state->target, pipe_format, state_swizzle, first_level, last_level, state->u.tex.first_layer, last_layer, width, height, depth, view->state, view->fmask_state); -- 2.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev