summaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_image.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vulkan/anv_image.c')
-rw-r--r--src/vulkan/anv_image.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vulkan/anv_image.c b/src/vulkan/anv_image.c
index 3b706c68443..0152fef9ffb 100644
--- a/src/vulkan/anv_image.c
+++ b/src/vulkan/anv_image.c
@@ -689,7 +689,10 @@ anv_CreateAttachmentView(VkDevice _device,
assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_ATTACHMENT_VIEW_CREATE_INFO);
- if (anv_is_vk_format_depth_or_stencil(pCreateInfo->format)) {
+ const struct anv_format *format =
+ anv_format_for_vk_format(pCreateInfo->format);
+
+ if (anv_format_is_depth_or_stencil(format)) {
struct anv_depth_stencil_view *view =
anv_device_alloc(device, sizeof(*view), 8,
VK_SYSTEM_ALLOC_TYPE_API_OBJECT);