diff options
author | Marek Olšák <[email protected]> | 2016-10-15 15:27:57 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-03-30 14:44:33 +0200 |
commit | 3685a12bad497bd979abf94d2c64ed9dcf1cdc5a (patch) | |
tree | 11d0ad18777fcd5441ee6b2c3ffd5b1efb0a77da | |
parent | 9c100bd693fa7a4d716f91fc5857596b177080c8 (diff) |
radeonsi/gfx9: don't write mipmap level offsets to BO metadata
GFX9 doesn't have (usable) mipmap offsets.
Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index f6c6f1f2dc5..de64e64a338 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -4053,12 +4053,15 @@ static void si_query_opaque_metadata(struct r600_common_screen *rscreen, /* Dwords [2:9] contain the image descriptor. */ memcpy(&md->metadata[2], desc, sizeof(desc)); + md->size_metadata = 10 * 4; /* Dwords [10:..] contain the mipmap level offsets. */ - for (i = 0; i <= res->last_level; i++) - md->metadata[10+i] = rtex->surface.u.legacy.level[i].offset >> 8; + if (rscreen->chip_class <= VI) { + for (i = 0; i <= res->last_level; i++) + md->metadata[10+i] = rtex->surface.u.legacy.level[i].offset >> 8; - md->size_metadata = (11 + res->last_level) * 4; + md->size_metadata += (1 + res->last_level) * 4; + } } static void si_apply_opaque_metadata(struct r600_common_screen *rscreen, |