diff --git a/docs/envvars.rst b/docs/envvars.rst index 28ef1993089..eebc2f8a1fe 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -595,6 +595,8 @@ RADV driver environment variables disable NGG for GFX10+ ``nooutoforder`` disable out-of-order rasterization + ``notccompatcmask`` + disable TC-compat CMASK for MSAA surfaces ``nothreadllvm`` disable LLVM threaded compilation ``noumr`` diff --git a/src/amd/vulkan/radv_debug.h b/src/amd/vulkan/radv_debug.h index e888cadc7bf..f0f889d79fd 100644 --- a/src/amd/vulkan/radv_debug.h +++ b/src/amd/vulkan/radv_debug.h @@ -61,6 +61,7 @@ enum { RADV_DEBUG_NO_UMR = 1ull << 30, RADV_DEBUG_INVARIANT_GEOM = 1ull << 31, RADV_DEBUG_NO_DISPLAY_DCC = 1ull << 32, + RADV_DEBUG_NO_TC_COMPAT_CMASK= 1ull << 33, }; enum { diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 043f763d83c..2a2698faba0 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[] = { {"noumr", RADV_DEBUG_NO_UMR}, {"invariantgeom", RADV_DEBUG_INVARIANT_GEOM}, {"nodisplaydcc", RADV_DEBUG_NO_DISPLAY_DCC}, + {"notccompatcmask", RADV_DEBUG_NO_TC_COMPAT_CMASK}, {NULL, 0} }; diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index 4d2c5cce6ef..7642a25a1fe 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -267,6 +267,9 @@ radv_use_tc_compat_cmask_for_image(struct radv_device *device, if (device->physical_device->rad_info.chip_class < GFX8) return false; + if (device->instance->debug_flags & RADV_DEBUG_NO_TC_COMPAT_CMASK) + return false; + /* TODO: Enable TC-compat CMASK on GFX8-9. */ if (device->physical_device->rad_info.chip_class < GFX10 && !(device->instance->perftest_flags & RADV_PERFTEST_TC_COMPAT_CMASK))