Mesa (master): ac/surface: add RADEON_SURF_SHAREABLE
Marek Olšák
mareko at kemper.freedesktop.org
Fri Aug 4 00:11:22 UTC 2017
Module: Mesa
Branch: master
Commit: 4e757d591db8d7e5038be0d22c5de1efa61cb724
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4e757d591db8d7e5038be0d22c5de1efa61cb724
Author: Marek Olšák <marek.olsak at amd.com>
Date: Fri Jul 28 23:01:10 2017 +0200
ac/surface: add RADEON_SURF_SHAREABLE
Shareable textures won't use tile swizzle.
Reviewed-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/amd/common/ac_surface.h | 1 +
src/gallium/drivers/radeon/r600_texture.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/amd/common/ac_surface.h b/src/amd/common/ac_surface.h
index 3c9e13e3f2..01a71f32b2 100644
--- a/src/amd/common/ac_surface.h
+++ b/src/amd/common/ac_surface.h
@@ -67,6 +67,7 @@ enum radeon_micro_mode {
#define RADEON_SURF_TC_COMPATIBLE_HTILE (1 << 23)
#define RADEON_SURF_IMPORTED (1 << 24)
#define RADEON_SURF_OPTIMIZE_FOR_SPACE (1 << 25)
+#define RADEON_SURF_SHAREABLE (1 << 26)
struct legacy_surf_level {
uint64_t offset;
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index 3aac3c78a9..2d58dc9649 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -280,8 +280,10 @@ static int r600_init_surface(struct r600_common_screen *rscreen,
flags |= RADEON_SURF_SCANOUT;
}
+ if (ptex->bind & PIPE_BIND_SHARED)
+ flags |= RADEON_SURF_SHAREABLE;
if (is_imported)
- flags |= RADEON_SURF_IMPORTED;
+ flags |= RADEON_SURF_IMPORTED | RADEON_SURF_SHAREABLE;
if (!(ptex->flags & R600_RESOURCE_FLAG_FORCE_TILING))
flags |= RADEON_SURF_OPTIMIZE_FOR_SPACE;
More information about the mesa-commit
mailing list