diff options
author | Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> | 2018-12-17 09:59:49 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> | 2018-12-20 15:07:20 +0100 |
commit | 9f0bfbed11f5fc4f3b899b1eb90570dbeeef45c0 (patch) | |
tree | 6c85668145a1e1e3d21d9db763ce18aaa7fa9e88 /src/amd/vulkan/radv_image.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 <nicolai.haehnle@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Diffstat (limited to 'src/amd/vulkan/radv_image.c')
-rw-r--r-- | src/amd/vulkan/radv_image.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index 2bd74e202fe..69bbcdcf645 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -249,6 +249,12 @@ radv_init_surface(struct radv_device *device, if (is_stencil) surface->flags |= RADEON_SURF_SBUFFER; + if (device->physical_device->rad_info.chip_class >= GFX9 && + pCreateInfo->imageType == VK_IMAGE_TYPE_3D && + vk_format_get_blocksizebits(pCreateInfo->format) == 128 && + vk_format_is_compressed(pCreateInfo->format)) + surface->flags |= RADEON_SURF_NO_RENDER_TARGET; + surface->flags |= RADEON_SURF_OPTIMIZE_FOR_SPACE; if (!radv_use_dcc_for_image(device, image, create_info, pCreateInfo)) |