Skip to content

Commit 7042851

Browse files
committed
tests: Add missing image support check
1 parent 0f6964a commit 7042851

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

tests/unit/sync_val_reporting.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/* Copyright (c) 2025 The Khronos Group Inc.
2-
* Copyright (c) 2025 Valve Corporation
3-
* Copyright (c) 2025 LunarG, Inc.
1+
/* Copyright (c) 2026 The Khronos Group Inc.
2+
* Copyright (c) 2026 Valve Corporation
3+
* Copyright (c) 2026 LunarG, Inc.
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -890,7 +890,12 @@ TEST_F(NegativeSyncValReporting, ReportDescriptorImage_SubmitTime) {
890890
vkt::Buffer buffer(*m_device, 128, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT);
891891
buffer.SetName("BufferA");
892892

893-
vkt::Image image(*m_device, 64, 64, VK_FORMAT_B8G8R8A8_UNORM, VK_IMAGE_USAGE_STORAGE_BIT);
893+
const VkImageCreateInfo image_ci =
894+
vkt::Image::ImageCreateInfo2D(64, 64, 1, 1, VK_FORMAT_B8G8R8A8_UNORM, VK_IMAGE_USAGE_STORAGE_BIT, VK_IMAGE_TILING_OPTIMAL);
895+
if (!IsImageFormatSupported(gpu_, image_ci, VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT | VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT)) {
896+
GTEST_SKIP() << "Format not supported";
897+
}
898+
vkt::Image image(*m_device, image_ci);
894899
image.SetLayout(VK_IMAGE_LAYOUT_GENERAL);
895900
image.SetName("ImageB");
896901

0 commit comments

Comments
 (0)