[Fix] (MG_Backend/DirectVulkan): silence some validation error on Windows

This commit is contained in:
2026-02-10 13:39:51 +08:00
parent a77088eeb3
commit ceaa6ff5f8
2 changed files with 6 additions and 0 deletions
@@ -46,7 +46,11 @@ namespace MobileGL::MG_Backend::DirectVulkan {
void VulkanContext::CreateInstance(const std::string& appName) {
VkApplicationInfo appInfo{VK_STRUCTURE_TYPE_APPLICATION_INFO};
appInfo.pApplicationName = appName.c_str();
#ifdef VK_USE_PLATFORM_WIN32_KHR
appInfo.apiVersion = VK_API_VERSION_1_3;
#elif
appInfo.apiVersion = VK_API_VERSION_1_1;
#endif
const char* exts[] = {VK_KHR_SURFACE_EXTENSION_NAME,
#ifdef VK_USE_PLATFORM_ANDROID_KHR
@@ -71,9 +71,11 @@ TEST(DirectVulkanSanity, ContextCreation) {
EGLNativeWindowType nativewindow = glfwGetWin32Window(window);
#endif
EGLSurface surface = eglCreateWindowSurface(display, config, nativewindow, nullptr);
eglMakeCurrent(display, surface, surface, context);
while(!glfwWindowShouldClose(window)) {
glfwPollEvents();
eglSwapBuffers(display, surface);
}
glfwDestroyWindow(window);