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 <memory>
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <string>
#include "../tests/common.h" #include "../tests/common.h"

View File

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