summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-10-09 17:02:07 -0400
committerMarek Olšák <[email protected]>2019-10-09 17:06:54 -0400
commite4f4bb8abd5f07ff25e3c594753ebc2553579f51 (patch)
treef7b793f7020b6abf10d0a86d10554afeffdb41c0 /src
parent28da990bedea508c8cd84ae5db7f46da955d4163 (diff)
radeonsi: don't set BO metadata for non-zero planes
pointed out by Bas
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_texture.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c
index 7fb671694c6..bbd87ee0b5f 100644
--- a/src/gallium/drivers/radeonsi/si_texture.c
+++ b/src/gallium/drivers/radeonsi/si_texture.c
@@ -1039,7 +1039,7 @@ static bool si_texture_get_handle(struct pipe_screen* screen,
}
/* Set metadata. */
- if (!res->b.is_shared || update_metadata)
+ if ((!res->b.is_shared || update_metadata) && whandle->offset == 0)
si_set_tex_bo_metadata(sscreen, tex);
if (sscreen->info.chip_class >= GFX9) {
@@ -1801,7 +1801,7 @@ static struct pipe_resource *si_texture_from_winsys_buffer(struct si_screen *ssc
}
/* Displayable DCC requires an explicit flush. */
- if (dedicated &&
+ if (dedicated && offset == 0 &&
!(usage & PIPE_HANDLE_USAGE_EXPLICIT_FLUSH) &&
si_has_displayable_dcc(tex)) {
/* TODO: do we need to decompress DCC? */