aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/r600_texture.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-11-30 02:16:29 +0100
committerMarek Olšák <[email protected]>2017-11-30 18:46:11 +0100
commited4780383cae61e051b3d3d120649222da49feae (patch)
treea9bbdf079149e980fc33615a99b57741198abd2d /src/gallium/drivers/radeon/r600_texture.c
parent6f0ce2617eee17215b797f8037f71df279697bbd (diff)
radeonsi/gfx9: fix importing shared textures with DCC
VI has 11 dwords at least. GFX9 has 10 dwords. Cc: 17.2 17.3 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_texture.c')
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index 1a0503bec6e..86a2e1b9a5e 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -646,7 +646,7 @@ static void si_apply_opaque_metadata(struct si_screen *sscreen,
/* Return if DCC is enabled. The texture should be set up with it
* already.
*/
- if (md->size_metadata >= 11 * 4 &&
+ if (md->size_metadata >= 10 * 4 && /* at least 2(header) + 8(desc) dwords */
md->metadata[0] != 0 &&
md->metadata[1] == si_get_bo_metadata_word1(sscreen) &&
G_008F28_COMPRESSION_EN(desc[6])) {