mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-07 19:58:32 +09:00
[Fix] (MG_Backend/DirectVulkan): silence some validation error on Windows
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user