]> O.S.I.I.S - jp/vkvg.git/commitdiff
osx inline pragma, activate VK_KHR_portability_subset if present
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 7 Dec 2021 10:35:35 +0000 (11:35 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 7 Dec 2021 10:35:35 +0000 (11:35 +0100)
src/cross_os.h
tests/common/vkengine.c
vkh

index 864d8f9cb7154925ff41ed2557e911cde04ce519..db2dc78400592626e182e97bd0815e76481ed252 100644 (file)
@@ -32,7 +32,7 @@
 #elif __APPLE__
        #include <math.h>
        #define isnanf isnan
-       #define vkvg_inline
+#define vkvg_inline static
 #elif __unix__
        #include <unistd.h>
        #include <sys/types.h>
index d06ed874dccf457a32fab4205d1cb721bcfa1a98..ae1cf58dd9f06a3f778a08a4d0c457f987b654e2 100644 (file)
@@ -175,11 +175,15 @@ vk_engine_t* vkengine_create (VkPhysicalDeviceType preferedGPU, VkPresentModeKHR
        enabledExts[enabledExtsCount] = "VK_KHR_swapchain";
        enabledExtsCount++;
 
-       if (vkh_phyinfo_try_get_extension_properties(pi, "VK_EXT_blend_operation_advanced", NULL)) {
-               enabledExts[enabledExtsCount] = "VK_EXT_blend_operation_advanced";
-               enabledExtsCount++;
-       }
+       if (vkh_phyinfo_try_get_extension_properties(pi, "VK_EXT_blend_operation_advanced", NULL))
+               enabledExts[enabledExtsCount++] = "VK_EXT_blend_operation_advanced";
+
+       if (vkh_phyinfo_try_get_extension_properties(pi, "VK_KHR_get_physical_device_properties2", NULL) &&
+               vkh_phyinfo_try_get_extension_properties(pi, "VK_KHR_portability_subset", NULL)) {
+               enabledExts[enabledExtsCount++] = "VK_KHR_get_physical_device_properties2";
+               enabledExts[enabledExtsCount++] = "VK_KHR_portability_subset";
 
+       }
        VkPhysicalDeviceFeatures enabledFeatures = {
                .fillModeNonSolid = true,
                //.sampleRateShading = true
diff --git a/vkh b/vkh
index b15e2e52f6eb74e72f31391dbcf007a9e5ce3815..61930b1e9ec4ce9b95ea0e4dd02d9a3e530a312b 160000 (submodule)
--- a/vkh
+++ b/vkh
@@ -1 +1 @@
-Subproject commit b15e2e52f6eb74e72f31391dbcf007a9e5ce3815
+Subproject commit 61930b1e9ec4ce9b95ea0e4dd02d9a3e530a312b