mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 23:50:11 +01:00
nvk: Bind 3D images as 3D for clears
Normally, Vulkan doesn't support binding 3D image views for rendering but we support it in NVK. If we bind it as a 2D array, that requires setting 2D_ARRAY_COMPATIBLE_BIT to get a 2D array layout. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
parent
c3f5211137
commit
681224260f
1 changed files with 2 additions and 1 deletions
|
|
@ -175,9 +175,10 @@ render_view_type(VkImageType image_type, unsigned layer_count)
|
|||
return layer_count == 1 ? VK_IMAGE_VIEW_TYPE_1D :
|
||||
VK_IMAGE_VIEW_TYPE_1D_ARRAY;
|
||||
case VK_IMAGE_TYPE_2D:
|
||||
case VK_IMAGE_TYPE_3D:
|
||||
return layer_count == 1 ? VK_IMAGE_VIEW_TYPE_2D :
|
||||
VK_IMAGE_VIEW_TYPE_2D_ARRAY;
|
||||
case VK_IMAGE_TYPE_3D:
|
||||
return VK_IMAGE_VIEW_TYPE_3D;
|
||||
default:
|
||||
unreachable("Invalid image type");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue