diff options
author | Bas Nieuwenhuizen <[email protected]> | 2018-12-17 09:59:49 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2018-12-20 15:07:20 +0100 |
commit | 9f0bfbed11f5fc4f3b899b1eb90570dbeeef45c0 (patch) | |
tree | 6c85668145a1e1e3d21d9db763ce18aaa7fa9e88 /src/amd/vulkan/radv_formats.c | |
parent | 5c7935f8fc7dc0fd6e2495da36f66c51f966e489 (diff) |
radv: Work around non-renderable 128bpp compressed 3d textures on GFX9.
Exactly what title says, the new addrlib does not allow the above with
certain dimensions that the CTS seems to hit. Work around it by not
allowing the app to render to it via compat with other 128bpp formats
and do not render to it ourselves during copies.
Fixes: 776b9113656 "amd/addrlib: update Mesa's copy of addrlib"
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_formats.c')
-rw-r--r-- | src/amd/vulkan/radv_formats.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index 59bc46d2fc8..84327980508 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c @@ -1112,6 +1112,18 @@ static VkResult radv_get_image_format_properties(struct radv_physical_device *ph maxMipLevels = 1; } + + /* We can't create 3d compressed 128bpp images that can be rendered to on GFX9 */ + if (physical_device->rad_info.chip_class >= GFX9 && + info->type == VK_IMAGE_TYPE_3D && + vk_format_get_blocksizebits(info->format) == 128 && + vk_format_is_compressed(info->format) && + (info->flags & VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT) && + ((info->flags & VK_IMAGE_CREATE_EXTENDED_USAGE_BIT) || + (info->usage & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT))) { + goto unsupported; + } + if (info->usage & VK_IMAGE_USAGE_SAMPLED_BIT) { if (!(format_feature_flags & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT)) { goto unsupported; |