From 013077e33d9fabc0033b79e73fe6cfc99dd333a6 Mon Sep 17 00:00:00 2001 From: Quentin LADEVIE Date: Fri, 26 Dec 2025 15:07:38 +0100 Subject: Add physical devices limits tests Complete transmittance LUT computation shaders --- api-test/vk-device.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'api-test/vk-device.cpp') diff --git a/api-test/vk-device.cpp b/api-test/vk-device.cpp index 71f4618..1e7b385 100644 --- a/api-test/vk-device.cpp +++ b/api-test/vk-device.cpp @@ -977,6 +977,23 @@ void vkdevice::pick_physical_device() { } bool vkdevice::device_support_features(VkPhysicalDevice physical_dev) { + // limits + { + VkPhysicalDeviceProperties2 props{ + .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, + .pNext = nullptr, + }; + vkGetPhysicalDeviceProperties2(physical_dev, &props); + + VkPhysicalDeviceLimits* limits = &props.properties.limits; + if (limits->maxPerStageDescriptorSampledImages < 0x10000 || + limits->maxPerStageDescriptorStorageImages < 0x10000 || + limits->maxDescriptorSetSampledImages < 0x10000 || + limits->maxDescriptorSetStorageImages < 0x10000) { + return false; + } + } + // Vulkan 1.2 physical device features support { VkPhysicalDeviceVulkan12Features vulkan_12_features{ -- cgit v1.3