]> O.S.I.I.S - jp/vkvg.git/commitdiff
VK_KHR_get_physical_device_properties2 is an instance ext
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 7 Dec 2021 21:30:18 +0000 (22:30 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 7 Dec 2021 21:30:18 +0000 (22:30 +0100)
src/vkvg_context_internal.c
src/vkvg_device.c
tests/common/vkengine.c

index a1a634c99214075b8a781174313c3e24e9028ecd..84e62e86e9964cff8303e846b3d2238b79dfb6b9 100644 (file)
@@ -759,7 +759,7 @@ float _build_vb_step (vkvg_context* ctx, float hw, vec2 pL, vec2 p0, vec2 pR, bo
        float lh = hw / cosf(alpha);
        bisec = vec2_perp(bisec);
 
-       //limit bisectrice lenght, may be improved but ok for perf
+       //limit bisectrice length, may be improved but ok for perf
        lh=fminf (lh, fminf (sqrtf(length_v0*length_v0+hw*hw), sqrtf(length_v1*length_v1+hw*hw)));
 
        bisec = vec2_mult(bisec,lh);
index 1363f9a2f1b8623b05e6c4644b22a00132b4cd25..43f561af79822971cbc95c8ed5a075ff7d63da82 100644 (file)
@@ -31,6 +31,7 @@ VkvgDevice vkvg_device_create(VkSampleCountFlags samples, bool deferredResolve)
 #if defined(DEBUG) && defined (VKVG_DBG_UTILS)
        enabledExts[enabledExtsCount++] = "VK_EXT_debug_utils";
 #endif
+       enabledExts[enabledExtsCount++] = "VK_KHR_get_physical_device_properties2";
 
        VkhApp app =  vkh_app_create("vkvg", 0, NULL, enabledExtsCount, enabledExts);
 
@@ -64,11 +65,8 @@ VkvgDevice vkvg_device_create(VkSampleCountFlags samples, bool deferredResolve)
 
        enabledExtsCount=0;
        //https://vulkan.lunarg.com/doc/view/1.2.162.0/mac/1.2-extensions/vkspec.html#VK_KHR_portability_subset
-       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)) {
+       if (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";
-       }
 
        VkDeviceCreateInfo device_info = { .sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,
                                                                           .queueCreateInfoCount = qCount,
index ae1cf58dd9f06a3f778a08a4d0c457f987b654e2..7a6b6eacc9cd018248856a9605ea5ab16f1d193c 100644 (file)
@@ -117,11 +117,9 @@ vk_engine_t* vkengine_create (VkPhysicalDeviceType preferedGPU, VkPresentModeKHR
        const char** enabledLayers = NULL;
 #endif
 #if defined(DEBUG) && defined (VKVG_DBG_UTILS)
-       enabledExts[enabledExtsCount] = "VK_EXT_debug_utils";
-       enabledExtsCount++;
+       enabledExts[enabledExtsCount++] = "VK_EXT_debug_utils";
 #endif
-       /*enabledExts[enabledExtsCount] = "VK_KHR_get_physical_device_properties2";
-       enabledExtsCount++;*/
+       enabledExts[enabledExtsCount++] = "VK_KHR_get_physical_device_properties2";
 
        e->app = vkh_app_create("vkvgTest", enabledLayersCount, enabledLayers, enabledExtsCount, enabledExts);
 #if defined(DEBUG) && defined (VKVG_DBG_UTILS)
@@ -178,12 +176,9 @@ vk_engine_t* vkengine_create (VkPhysicalDeviceType preferedGPU, VkPresentModeKHR
        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)) {
+       if (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