diff options
author | Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> | 2021-02-28 02:59:25 +0100 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-03-01 14:42:41 +0000 |
commit | ff99faf0cf3bf5eb12761f475876090b751d410f (patch) | |
tree | 02f52e939e9a1ac8f528fa1d4d57ff4079b373f0 | |
parent | 3c9452c3aef4560a5ed1da4ebad7cbe3e7f4941e (diff) |
radv: Add nodisplaydcc option.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9318>
-rw-r--r-- | docs/envvars.rst | 2 | ||||
-rw-r--r-- | src/amd/vulkan/radv_debug.h | 1 | ||||
-rw-r--r-- | src/amd/vulkan/radv_device.c | 1 | ||||
-rw-r--r-- | src/amd/vulkan/radv_formats.c | 2 | ||||
-rw-r--r-- | src/amd/vulkan/radv_image.c | 2 |
5 files changed, 7 insertions, 1 deletions
diff --git a/docs/envvars.rst b/docs/envvars.rst index 09621c2d3a9..28ef1993089 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -579,6 +579,8 @@ RADV driver environment variables disable compute queue ``nodcc`` disable Delta Color Compression (DCC) on images + ``nodisplaydcc`` + disable Delta Color Compression (DCC) on displayable images ``nodynamicbounds`` do not check OOB access for dynamic descriptors ``nofastclears`` diff --git a/src/amd/vulkan/radv_debug.h b/src/amd/vulkan/radv_debug.h index 735064ad1ff..e888cadc7bf 100644 --- a/src/amd/vulkan/radv_debug.h +++ b/src/amd/vulkan/radv_debug.h @@ -60,6 +60,7 @@ enum { RADV_DEBUG_IMG = 1ull << 29, RADV_DEBUG_NO_UMR = 1ull << 30, RADV_DEBUG_INVARIANT_GEOM = 1ull << 31, + RADV_DEBUG_NO_DISPLAY_DCC = 1ull << 32, }; enum { diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index ce492a0d309..a22352b4a0c 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -796,6 +796,7 @@ static const struct debug_control radv_debug_options[] = { {"img", RADV_DEBUG_IMG}, {"noumr", RADV_DEBUG_NO_UMR}, {"invariantgeom", RADV_DEBUG_INVARIANT_GEOM}, + {"nodisplaydcc", RADV_DEBUG_NO_DISPLAY_DCC}, {NULL, 0} }; diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index adcbc3c7eed..4161c6bad96 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c @@ -1152,7 +1152,7 @@ radv_get_modifier_flags(struct radv_physical_device *dev, if (ac_modifier_has_dcc(modifier)) { features &= ~VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT; - if (dev->instance->debug_flags & RADV_DEBUG_NO_DCC) + if (dev->instance->debug_flags & (RADV_DEBUG_NO_DCC | RADV_DEBUG_NO_DISPLAY_DCC)) return 0; } diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index 0aeefbef635..6b6cad5cefa 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -424,6 +424,8 @@ radv_patch_image_from_extra_info(struct radv_device *device, if (radv_surface_has_scanout(device, create_info)) { image->planes[plane].surface.flags |= RADEON_SURF_SCANOUT; + if (device->instance->debug_flags & RADV_DEBUG_NO_DISPLAY_DCC) + image->planes[plane].surface.flags |= RADEON_SURF_DISABLE_DCC; image->info.surf_index = NULL; } |