diff options
| author | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-22 04:37:57 -0500 |
|---|---|---|
| committer | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-22 04:37:57 -0500 |
| commit | 4f4fc5ecced9c0a8a8125dfd23f9002f2dcc5f08 (patch) | |
| tree | 0350928f73da71c193f4900c57cb6331078d8d37 /runtime | |
| parent | 1bcbe18bbb548f538b96e9d9c3eeccf8a012adb5 (diff) | |
| parent | fd7761947a4b6863e32ab1605c79e4d89f7344af (diff) | |
Merge pull request #1266 from Vonsek
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | runtime/test/depth24_convert_test.cpp | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index 2f957ff02..642c82bdf 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt | |||
| @@ -609,6 +609,10 @@ if(TARGET Vulkan::Headers) | |||
| 609 | target_compile_definitions(${tool} PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX) | 609 | target_compile_definitions(${tool} PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX) |
| 610 | endif() | 610 | endif() |
| 611 | endforeach() | 611 | endforeach() |
| 612 | if(BUILD_TESTING) | ||
| 613 | add_test(NAME depth24_convert COMMAND depth24_convert_test) | ||
| 614 | set_tests_properties(depth24_convert PROPERTIES SKIP_RETURN_CODE 77) | ||
| 615 | endif() | ||
| 612 | if(NOT Vulkan_GLSLANG_VALIDATOR_EXECUTABLE) | 616 | if(NOT Vulkan_GLSLANG_VALIDATOR_EXECUTABLE) |
| 613 | find_program(Vulkan_GLSLANG_VALIDATOR_EXECUTABLE glslangValidator HINTS "$ENV{VULKAN_SDK}/Bin" "$ENV{VULKAN_SDK}/bin") | 617 | find_program(Vulkan_GLSLANG_VALIDATOR_EXECUTABLE glslangValidator HINTS "$ENV{VULKAN_SDK}/Bin" "$ENV{VULKAN_SDK}/bin") |
| 614 | endif() | 618 | endif() |
diff --git a/runtime/test/depth24_convert_test.cpp b/runtime/test/depth24_convert_test.cpp index 211354d71..00933b0ff 100644 --- a/runtime/test/depth24_convert_test.cpp +++ b/runtime/test/depth24_convert_test.cpp | |||
| @@ -47,10 +47,12 @@ std::uint32_t as_bits(float f) { | |||
| 47 | 47 | ||
| 48 | int main() { | 48 | int main() { |
| 49 | vktest::Device gpu; | 49 | vktest::Device gpu; |
| 50 | if (!gpu.create()) { | 50 | const auto status = gpu.initialize(); |
| 51 | if (status == vktest::DeviceStatus::unavailable) { | ||
| 51 | std::printf("depth24_convert_test: no Vulkan device, skipped\n"); | 52 | std::printf("depth24_convert_test: no Vulkan device, skipped\n"); |
| 52 | return 0; | 53 | return 77; |
| 53 | } | 54 | } |
| 55 | if (status != vktest::DeviceStatus::ready) return 1; | ||
| 54 | 56 | ||
| 55 | // The converter allocates nothing here (every job brings its scratch buffer), but the callback must exist. | 57 | // The converter allocates nothing here (every job brings its scratch buffer), but the callback must exist. |
| 56 | Depth24Converter converter(gpu.device_proc, gpu.device, [](const VkMemoryRequirements&) { return VK_NULL_HANDLE; }); | 58 | Depth24Converter converter(gpu.device_proc, gpu.device, [](const VkMemoryRequirements&) { return VK_NULL_HANDLE; }); |