mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
radeonsi: enable DCC stores for clear_render_target on gfx10
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12449>
This commit is contained in:
parent
b648d6fbf8
commit
cb845c53f4
2 changed files with 5 additions and 3 deletions
|
|
@ -1074,7 +1074,8 @@ static void si_clear_render_target(struct pipe_context *ctx, struct pipe_surface
|
|||
struct si_context *sctx = (struct si_context *)ctx;
|
||||
struct si_texture *sdst = (struct si_texture *)dst->texture;
|
||||
|
||||
if (dst->texture->nr_samples <= 1 && !vi_dcc_enabled(sdst, dst->u.tex.level)) {
|
||||
if (dst->texture->nr_samples <= 1 &&
|
||||
(sctx->chip_class >= GFX10 || !vi_dcc_enabled(sdst, dst->u.tex.level))) {
|
||||
si_compute_clear_render_target(ctx, dst, color, dstx, dsty, width, height,
|
||||
render_condition_enabled);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -773,6 +773,7 @@ void si_compute_clear_render_target(struct pipe_context *ctx, struct pipe_surfac
|
|||
bool render_condition_enabled)
|
||||
{
|
||||
struct si_context *sctx = (struct si_context *)ctx;
|
||||
struct si_texture *tex = (struct si_texture*)dstsurf->texture;
|
||||
unsigned num_layers = dstsurf->u.tex.last_layer - dstsurf->u.tex.first_layer + 1;
|
||||
unsigned data[4 + sizeof(color->ui)] = {dstx, dsty, dstsurf->u.tex.first_layer, 0};
|
||||
|
||||
|
|
@ -794,7 +795,7 @@ void si_compute_clear_render_target(struct pipe_context *ctx, struct pipe_surfac
|
|||
}
|
||||
|
||||
si_make_CB_shader_coherent(sctx, dstsurf->texture->nr_samples, true,
|
||||
true /* DCC is not possible with image stores */);
|
||||
tex->surface.u.gfx9.color.dcc.pipe_aligned);
|
||||
|
||||
struct pipe_constant_buffer saved_cb = {};
|
||||
si_get_pipe_constant_buffer(sctx, PIPE_SHADER_COMPUTE, 0, &saved_cb);
|
||||
|
|
@ -810,7 +811,7 @@ void si_compute_clear_render_target(struct pipe_context *ctx, struct pipe_surfac
|
|||
|
||||
struct pipe_image_view image = {0};
|
||||
image.resource = dstsurf->texture;
|
||||
image.shader_access = image.access = PIPE_IMAGE_ACCESS_WRITE;
|
||||
image.shader_access = image.access = PIPE_IMAGE_ACCESS_WRITE | SI_IMAGE_ACCESS_DCC_WRITE;
|
||||
image.format = util_format_linear(dstsurf->format);
|
||||
image.u.tex.level = dstsurf->u.tex.level;
|
||||
image.u.tex.first_layer = 0; /* 3D images ignore first_layer (BASE_ARRAY) */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue