From: Jean-Philippe Bruyère Date: Tue, 7 Dec 2021 21:30:18 +0000 (+0100) Subject: VK_KHR_get_physical_device_properties2 is an instance ext X-Git-Tag: v0.2.0~42 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=46396147b1275c3d46b51fe442fe44171f01c7fc;p=jp%2Fvkvg.git VK_KHR_get_physical_device_properties2 is an instance ext --- diff --git a/src/vkvg_context_internal.c b/src/vkvg_context_internal.c index a1a634c..84e62e8 100644 --- a/src/vkvg_context_internal.c +++ b/src/vkvg_context_internal.c @@ -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); diff --git a/src/vkvg_device.c b/src/vkvg_device.c index 1363f9a..43f561a 100644 --- a/src/vkvg_device.c +++ b/src/vkvg_device.c @@ -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, diff --git a/tests/common/vkengine.c b/tests/common/vkengine.c index ae1cf58..7a6b6ea 100644 --- a/tests/common/vkengine.c +++ b/tests/common/vkengine.c @@ -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