Vulkan: Fix compile issues on Windows because of min/max.

This commit is contained in:
BearOso 2024-04-13 11:06:14 -05:00
parent 46c6bd7eb4
commit 130942f578
6 changed files with 9 additions and 7 deletions

View File

@ -105,7 +105,7 @@ bool Context::init_win32(HINSTANCE hinstance, HWND hwnd, int preferred_device)
auto win32_surface_create_info = vk::Win32SurfaceCreateInfoKHR{}
.setHinstance(hinstance)
.setHwnd(hwnd);
surface = instance->createWin32SurfaceKHRUnique(win32_surface_create_info);
surface = instance->createWin32SurfaceKHRUnique(win32_surface_create_info).value;
if (!surface)
return false;
return init(preferred_device);

View File

@ -9,7 +9,7 @@
#endif
#include <cstdio>
#include <cstdint>
#include "vulkan/vulkan.hpp"
#include "vulkan/vulkan_hpp_wrapper.hpp"
#include "../external/VulkanMemoryAllocator-Hpp/include/vk_mem_alloc.hpp"
#include "vulkan_swapchain.hpp"
#include <memory>

View File

@ -1,2 +1,2 @@
#include "vulkan/vulkan.hpp"
#include "vulkan_hpp_wrapper.hpp"
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE

View File

@ -0,0 +1,4 @@
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include "vulkan/vulkan.hpp"

View File

@ -1,5 +1,5 @@
#pragma once
#include "vulkan/vulkan.hpp"
#include "vulkan/vulkan_hpp_wrapper.hpp"
#include "slang_shader.hpp"
#include "vulkan_context.hpp"
#include "vulkan_pipeline_image.hpp"

View File

@ -1,8 +1,6 @@
#pragma once
#include "vulkan/vulkan.hpp"
#include "vulkan/vulkan_handles.hpp"
#include "vulkan/vulkan_structs.hpp"
#include "vulkan/vulkan_hpp_wrapper.hpp"
#include <functional>
namespace Vulkan