radeonsi/gfx9: fix importing shared textures with DCC
VI has 11 dwords at least. GFX9 has 10 dwords. Cc: 17.2 17.3 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
6f0ce2617e
commit
ed4780383c
|
@ -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])) {
|
||||
|
|
Loading…
Reference in New Issue