test: Use VK_NULL_HANDLE to enable 32 bit builds

This commit is contained in:
Charles Giessen 2021-03-01 15:32:26 -07:00 committed by Charles Giessen
parent 0c29d98362
commit 07ae8845a7
2 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,7 @@
#include <memory>
#include <iostream>
#include <fstream>
#include <string>
#include "../tests/common.h"

View File

@ -32,7 +32,7 @@ void destroy_window_glfw(GLFWwindow* window) {
glfwTerminate();
}
VkSurfaceKHR create_surface_glfw(VkInstance instance, GLFWwindow* window) {
VkSurfaceKHR surface = nullptr;
VkSurfaceKHR surface = VK_NULL_HANDLE;
VkResult err = glfwCreateWindowSurface(instance, window, NULL, &surface);
if (err) {
const char* error_msg;
@ -42,7 +42,7 @@ VkSurfaceKHR create_surface_glfw(VkInstance instance, GLFWwindow* window) {
if (error_msg != nullptr) std::cout << error_msg;
std::cout << "\n";
}
surface = nullptr;
surface = VK_NULL_HANDLE;
}
return surface;
}