mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +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) {
|
void VulkanContext::CreateInstance(const std::string& appName) {
|
||||||
VkApplicationInfo appInfo{VK_STRUCTURE_TYPE_APPLICATION_INFO};
|
VkApplicationInfo appInfo{VK_STRUCTURE_TYPE_APPLICATION_INFO};
|
||||||
appInfo.pApplicationName = appName.c_str();
|
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;
|
appInfo.apiVersion = VK_API_VERSION_1_1;
|
||||||
|
#endif
|
||||||
|
|
||||||
const char* exts[] = {VK_KHR_SURFACE_EXTENSION_NAME,
|
const char* exts[] = {VK_KHR_SURFACE_EXTENSION_NAME,
|
||||||
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
||||||
|
|||||||
@@ -71,9 +71,11 @@ TEST(DirectVulkanSanity, ContextCreation) {
|
|||||||
EGLNativeWindowType nativewindow = glfwGetWin32Window(window);
|
EGLNativeWindowType nativewindow = glfwGetWin32Window(window);
|
||||||
#endif
|
#endif
|
||||||
EGLSurface surface = eglCreateWindowSurface(display, config, nativewindow, nullptr);
|
EGLSurface surface = eglCreateWindowSurface(display, config, nativewindow, nullptr);
|
||||||
|
eglMakeCurrent(display, surface, surface, context);
|
||||||
|
|
||||||
while(!glfwWindowShouldClose(window)) {
|
while(!glfwWindowShouldClose(window)) {
|
||||||
glfwPollEvents();
|
glfwPollEvents();
|
||||||
|
eglSwapBuffers(display, surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
glfwDestroyWindow(window);
|
glfwDestroyWindow(window);
|
||||||
|
|||||||
Reference in New Issue
Block a user