Vulkan-Hpp: Don't use exceptions.

This commit is contained in:
BearOso 2024-04-12 18:47:16 -05:00
parent 7cf9f59923
commit 46c6bd7eb4
13 changed files with 89 additions and 86 deletions

View File

@ -107,6 +107,8 @@ if(USE_SLANG)
list(APPEND DEFINES "VK_USE_PLATFORM_XLIB_KHR" list(APPEND DEFINES "VK_USE_PLATFORM_XLIB_KHR"
"VK_USE_PLATFORM_WAYLAND_KHR" "VK_USE_PLATFORM_WAYLAND_KHR"
"VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1" "VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1"
"VULKAN_HPP_NO_DISCARD_WARNINGS=1"
"VULKAN_HPP_NO_EXCEPTIONS=1"
"VMA_DYNAMIC_VULKAN_FUNCTIONS=1" "VMA_DYNAMIC_VULKAN_FUNCTIONS=1"
"VMA_STATIC_VULKAN_FUNCTIONS=0" "VMA_STATIC_VULKAN_FUNCTIONS=0"
"IMGUI_IMPL_VULKAN_NO_PROTOTYPES") "IMGUI_IMPL_VULKAN_NO_PROTOTYPES")

View File

@ -58,7 +58,7 @@ bool S9xVulkanDisplayDriver::init_imgui()
.setPoolSizes(pool_sizes) .setPoolSizes(pool_sizes)
.setMaxSets(1000) .setMaxSets(1000)
.setFlags(vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet); .setFlags(vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet);
imgui_descriptor_pool = device.createDescriptorPoolUnique(descriptor_pool_create_info); imgui_descriptor_pool = device.createDescriptorPoolUnique(descriptor_pool_create_info).value;
ImGui_ImplVulkan_InitInfo init_info{}; ImGui_ImplVulkan_InitInfo init_info{};
init_info.Instance = context->instance.get(); init_info.Instance = context->instance.get();

View File

@ -228,6 +228,8 @@ endif()
list(APPEND DEFINES list(APPEND DEFINES
"VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1" "VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1"
"VULKAN_HPP_NO_NODISCARD_WARNINGS=1"
"VULKAN_HPP_NO_EXCEPTIONS=1"
"VMA_DYNAMIC_VULKAN_FUNCTIONS=1" "VMA_DYNAMIC_VULKAN_FUNCTIONS=1"
"VMA_STATIC_VULKAN_FUNCTIONS=0" "VMA_STATIC_VULKAN_FUNCTIONS=0"
"USE_SLANG") "USE_SLANG")

View File

@ -52,7 +52,7 @@ bool EmuCanvasVulkan::initImGui()
.setPoolSizes(pool_sizes) .setPoolSizes(pool_sizes)
.setMaxSets(1000) .setMaxSets(1000)
.setFlags(vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet); .setFlags(vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet);
imgui_descriptor_pool = context->device.createDescriptorPoolUnique(descriptor_pool_create_info); imgui_descriptor_pool = context->device.createDescriptorPoolUnique(descriptor_pool_create_info).value;
ImGui_ImplVulkan_InitInfo init_info{}; ImGui_ImplVulkan_InitInfo init_info{};
init_info.Instance = context->instance.get(); init_info.Instance = context->instance.get();

View File

@ -1,4 +1,3 @@
#include <exception>
#include <cstring> #include <cstring>
#include <tuple> #include <tuple>
#include <vector> #include <vector>
@ -19,7 +18,7 @@ Context::~Context()
{ {
if (!device) if (!device)
return; return;
device.waitIdle(); wait_idle();
swapchain = nullptr; swapchain = nullptr;
@ -29,7 +28,7 @@ Context::~Context()
allocator.destroy(); allocator.destroy();
surface.reset(); surface.reset();
device.waitIdle(); wait_idle();
device.destroy(); device.destroy();
} }
@ -63,17 +62,17 @@ static vk::UniqueInstance create_instance_preamble(const char *wsi_extension)
vk::ApplicationInfo application_info({}, {}, {}, {}, VK_API_VERSION_1_0); vk::ApplicationInfo application_info({}, {}, {}, {}, VK_API_VERSION_1_0);
vk::InstanceCreateInfo instance_create_info({}, &application_info, {}, extensions); vk::InstanceCreateInfo instance_create_info({}, &application_info, {}, extensions);
vk::UniqueInstance instance; auto [result, instance] = vk::createInstanceUnique(instance_create_info);
try {
instance = vk::createInstanceUnique(instance_create_info); if (result != vk::Result::eSuccess)
} catch (std::exception &e) { {
instance.reset(); instance.reset();
return {}; return {};
} }
VULKAN_HPP_DEFAULT_DISPATCHER.init(instance.get()); VULKAN_HPP_DEFAULT_DISPATCHER.init(instance.get());
return instance; return std::move(instance);
} }
std::vector<std::string> Vulkan::Context::get_device_list() std::vector<std::string> Vulkan::Context::get_device_list()
@ -83,7 +82,7 @@ std::vector<std::string> Vulkan::Context::get_device_list()
if (!instance) if (!instance)
return {}; return {};
auto device_list = instance->enumeratePhysicalDevices(); auto [result, device_list] = instance->enumeratePhysicalDevices();
for (auto &d : device_list) for (auto &d : device_list)
{ {
auto props = d.getProperties(); auto props = d.getProperties();
@ -119,11 +118,12 @@ bool Context::init_Xlib(Display *dpy, Window xid, int preferred_device)
instance = create_instance_preamble(VK_KHR_XLIB_SURFACE_EXTENSION_NAME); instance = create_instance_preamble(VK_KHR_XLIB_SURFACE_EXTENSION_NAME);
if (!instance) if (!instance)
return false; return false;
surface = instance->createXlibSurfaceKHRUnique({ {}, dpy, xid }); auto retval = instance->createXlibSurfaceKHRUnique({ {}, dpy, xid });
if (retval.result != vk::Result::eSuccess)
if (!surface)
return false; return false;
surface = std::move(retval.value);
return init(preferred_device); return init(preferred_device);
} }
#endif #endif
@ -138,9 +138,11 @@ bool Context::init_wayland(wl_display *dpy, wl_surface *parent, int initial_widt
auto wayland_surface_create_info = vk::WaylandSurfaceCreateInfoKHR{} auto wayland_surface_create_info = vk::WaylandSurfaceCreateInfoKHR{}
.setSurface(parent) .setSurface(parent)
.setDisplay(dpy); .setDisplay(dpy);
surface = instance->createWaylandSurfaceKHRUnique(wayland_surface_create_info);
if (!surface) auto [result, new_surface] = instance->createWaylandSurfaceKHRUnique(wayland_surface_create_info);
if (result != vk::Result::eSuccess)
return false; return false;
surface = std::move(new_surface);
init_device(preferred_device); init_device(preferred_device);
init_vma(); init_vma();
@ -173,7 +175,9 @@ bool Context::init_descriptor_pool()
.setPoolSizes(descriptor_pool_size) .setPoolSizes(descriptor_pool_size)
.setMaxSets(20) .setMaxSets(20)
.setFlags(vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet); .setFlags(vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet);
descriptor_pool = device.createDescriptorPoolUnique(descriptor_pool_create_info);
auto retval = device.createDescriptorPoolUnique(descriptor_pool_create_info);
descriptor_pool = std::move(retval.value);
return true; return true;
} }
@ -182,19 +186,20 @@ bool Context::init_command_pool()
{ {
vk::CommandPoolCreateInfo cpci({}, graphics_queue_family_index); vk::CommandPoolCreateInfo cpci({}, graphics_queue_family_index);
cpci.setFlags(vk::CommandPoolCreateFlagBits::eResetCommandBuffer); cpci.setFlags(vk::CommandPoolCreateFlagBits::eResetCommandBuffer);
command_pool = device.createCommandPoolUnique(cpci); auto retval = device.createCommandPoolUnique(cpci);
command_pool = std::move(retval.value);
return true; return true;
} }
bool Context::init_device(int preferred_device) bool Context::init_device(int preferred_device)
{ {
auto device_list = instance->enumeratePhysicalDevices(); auto device_list = instance->enumeratePhysicalDevices().value;
auto find_device = [&]() -> vk::PhysicalDevice { auto find_device = [&]() -> vk::PhysicalDevice {
for (auto &d : device_list) for (auto &d : device_list)
{ {
auto ep = d.enumerateDeviceExtensionProperties(); auto [retval, ep] = d.enumerateDeviceExtensionProperties();
auto exists = std::find_if(ep.begin(), ep.end(), [](vk::ExtensionProperties &ext) { auto exists = std::find_if(ep.begin(), ep.end(), [](vk::ExtensionProperties &ext) {
return (std::string(ext.extensionName.data()) == VK_KHR_SWAPCHAIN_EXTENSION_NAME); return (std::string(ext.extensionName.data()) == VK_KHR_SWAPCHAIN_EXTENSION_NAME);
}); });
@ -228,10 +233,10 @@ bool Context::init_device(int preferred_device)
std::vector<float> priorities { 1.0f }; std::vector<float> priorities { 1.0f };
vk::DeviceQueueCreateInfo dqci({}, graphics_queue_family_index, priorities); vk::DeviceQueueCreateInfo dqci({}, graphics_queue_family_index, priorities);
vk::DeviceCreateInfo dci({}, dqci, {}, extension_names, {}); vk::DeviceCreateInfo dci({}, dqci, {}, extension_names, {});
device = physical_device.createDevice(dci); device = physical_device.createDevice(dci).value;
queue = device.getQueue(graphics_queue_family_index, 0); queue = device.getQueue(graphics_queue_family_index, 0);
auto surface_formats = physical_device.getSurfaceFormatsKHR(surface.get()); auto [retval, surface_formats] = physical_device.getSurfaceFormatsKHR(surface.get());
auto format = std::find_if(surface_formats.begin(), surface_formats.end(), [](vk::SurfaceFormatKHR &f) { auto format = std::find_if(surface_formats.begin(), surface_formats.end(), [](vk::SurfaceFormatKHR &f) {
return (f.format == vk::Format::eB8G8R8A8Unorm); return (f.format == vk::Format::eB8G8R8A8Unorm);
}); });
@ -253,7 +258,7 @@ bool Context::init_vma()
.setInstance(instance.get()) .setInstance(instance.get())
.setPhysicalDevice(physical_device) .setPhysicalDevice(physical_device)
.setPVulkanFunctions(&vulkan_functions); .setPVulkanFunctions(&vulkan_functions);
allocator = vma::createAllocator(allocator_create_info); allocator = vma::createAllocator(allocator_create_info).value;
return true; return true;
} }
@ -279,7 +284,7 @@ void Context::wait_idle()
vk::CommandBuffer Context::begin_cmd_buffer() vk::CommandBuffer Context::begin_cmd_buffer()
{ {
vk::CommandBufferAllocateInfo command_buffer_allocate_info(command_pool.get(), vk::CommandBufferLevel::ePrimary, 1); vk::CommandBufferAllocateInfo command_buffer_allocate_info(command_pool.get(), vk::CommandBufferLevel::ePrimary, 1);
auto command_buffer = device.allocateCommandBuffers(command_buffer_allocate_info); auto command_buffer = device.allocateCommandBuffers(command_buffer_allocate_info).value;
one_time_use_cmd = command_buffer[0]; one_time_use_cmd = command_buffer[0];
one_time_use_cmd.begin({ vk::CommandBufferUsageFlagBits::eOneTimeSubmit }); one_time_use_cmd.begin({ vk::CommandBufferUsageFlagBits::eOneTimeSubmit });
return one_time_use_cmd; return one_time_use_cmd;

View File

@ -229,7 +229,7 @@ void PipelineImage::create(int width, int height, vk::Format fmt, vk::RenderPass
.setSamples(vk::SampleCountFlagBits::e1) .setSamples(vk::SampleCountFlagBits::e1)
.setSharingMode(vk::SharingMode::eExclusive); .setSharingMode(vk::SharingMode::eExclusive);
std::tie(image, image_allocation) = allocator.createImage(image_create_info, allocation_create_info); std::tie(image, image_allocation) = allocator.createImage(image_create_info, allocation_create_info).value;
auto subresource_range = vk::ImageSubresourceRange{} auto subresource_range = vk::ImageSubresourceRange{}
.setAspectMask(vk::ImageAspectFlagBits::eColor) .setAspectMask(vk::ImageAspectFlagBits::eColor)
@ -245,10 +245,10 @@ void PipelineImage::create(int width, int height, vk::Format fmt, vk::RenderPass
.setComponents(vk::ComponentMapping()) .setComponents(vk::ComponentMapping())
.setSubresourceRange(subresource_range); .setSubresourceRange(subresource_range);
image_view = device.createImageView(image_view_create_info); image_view = device.createImageView(image_view_create_info).value;
image_view_create_info.setSubresourceRange(vk::ImageSubresourceRange(vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1)); image_view_create_info.setSubresourceRange(vk::ImageSubresourceRange(vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1));
mipless_view = device.createImageView(image_view_create_info); mipless_view = device.createImageView(image_view_create_info).value;
image_width = width; image_width = width;
image_height = height; image_height = height;
@ -260,7 +260,7 @@ void PipelineImage::create(int width, int height, vk::Format fmt, vk::RenderPass
.setRenderPass(renderpass) .setRenderPass(renderpass)
.setLayers(1); .setLayers(1);
framebuffer = device.createFramebufferUnique(framebuffer_create_info); framebuffer = device.createFramebufferUnique(framebuffer_create_info).value;
} }
} // namespace Vulkan } // namespace Vulkan

View File

@ -40,7 +40,7 @@ void ShaderChain::construct_buffer_objects()
uint8_t *ubo_memory = nullptr; uint8_t *ubo_memory = nullptr;
if (pipeline.shader->ubo_size > 0) if (pipeline.shader->ubo_size > 0)
ubo_memory = (uint8_t *)context->allocator.mapMemory(pipeline.uniform_buffer_allocation); ubo_memory = (uint8_t *)context->allocator.mapMemory(pipeline.uniform_buffer_allocation).value;
for (auto &uniform : pipeline.shader->uniforms) for (auto &uniform : pipeline.shader->uniforms)
{ {
@ -248,7 +248,7 @@ bool ShaderChain::load_shader_preset(std::string filename)
.setMaxSets(pipelines.size() * queue_size) .setMaxSets(pipelines.size() * queue_size)
.setFlags(vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet); .setFlags(vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet);
descriptor_pool = context->device.createDescriptorPoolUnique(descriptor_pool_create_info); descriptor_pool = context->device.createDescriptorPoolUnique(descriptor_pool_create_info).value;
for (auto &p : pipelines) for (auto &p : pipelines)
p->generate_frame_resources(descriptor_pool.get()); p->generate_frame_resources(descriptor_pool.get());
@ -267,9 +267,9 @@ bool ShaderChain::load_shader_preset(std::string filename)
.setFlags(vma::AllocationCreateFlagBits::eHostAccessSequentialWrite) .setFlags(vma::AllocationCreateFlagBits::eHostAccessSequentialWrite)
.setRequiredFlags(vk::MemoryPropertyFlagBits::eHostVisible); .setRequiredFlags(vk::MemoryPropertyFlagBits::eHostVisible);
std::tie(vertex_buffer, vertex_buffer_allocation) = context->allocator.createBuffer(buffer_create_info, allocation_create_info); std::tie(vertex_buffer, vertex_buffer_allocation) = context->allocator.createBuffer(buffer_create_info, allocation_create_info).value;
auto vertex_buffer_memory = context->allocator.mapMemory(vertex_buffer_allocation); auto vertex_buffer_memory = context->allocator.mapMemory(vertex_buffer_allocation).value;
memcpy(vertex_buffer_memory, vertex_data, sizeof(vertex_data)); memcpy(vertex_buffer_memory, vertex_data, sizeof(vertex_data));
context->allocator.unmapMemory(vertex_buffer_allocation); context->allocator.unmapMemory(vertex_buffer_allocation);
context->allocator.flushAllocation(vertex_buffer_allocation, 0, sizeof(vertex_data)); context->allocator.flushAllocation(vertex_buffer_allocation, 0, sizeof(vertex_data));

View File

@ -62,7 +62,7 @@ void SimpleOutput::create_objects()
.setDescriptorPool(context->descriptor_pool.get()) .setDescriptorPool(context->descriptor_pool.get())
.setDescriptorSetCount(1) .setDescriptorSetCount(1)
.setSetLayouts(descriptor_set_layout.get()); .setSetLayouts(descriptor_set_layout.get());
auto descriptor = device.allocateDescriptorSetsUnique(dsai); auto descriptor = device.allocateDescriptorSetsUnique(dsai).value;
descriptors.push_back(std::move(descriptor[0])); descriptors.push_back(std::move(descriptor[0]));
} }
@ -87,11 +87,11 @@ void SimpleOutput::create_objects()
.setMaxLod(1.0f) .setMaxLod(1.0f)
.setMipLodBias(0.0) .setMipLodBias(0.0)
.setCompareEnable(false); .setCompareEnable(false);
linear_sampler = device.createSampler(sci); linear_sampler = device.createSampler(sci).value;
sci.setMinFilter(vk::Filter::eNearest) sci.setMinFilter(vk::Filter::eNearest)
.setMagFilter(vk::Filter::eNearest); .setMagFilter(vk::Filter::eNearest);
nearest_sampler = device.createSampler(sci); nearest_sampler = device.createSampler(sci).value;
} }
void SimpleOutput::create_pipeline() void SimpleOutput::create_pipeline()
@ -99,8 +99,8 @@ void SimpleOutput::create_pipeline()
auto vertex_spirv = SlangShader::generate_spirv(vertex_shader, "vertex"); auto vertex_spirv = SlangShader::generate_spirv(vertex_shader, "vertex");
auto fragment_spirv = SlangShader::generate_spirv(fragment_shader, "fragment"); auto fragment_spirv = SlangShader::generate_spirv(fragment_shader, "fragment");
auto vertex_module = device.createShaderModuleUnique({ {}, vertex_spirv }); auto vertex_module = device.createShaderModuleUnique({ {}, vertex_spirv }).value;
auto fragment_module = device.createShaderModuleUnique({ {}, fragment_spirv }); auto fragment_module = device.createShaderModuleUnique({ {}, fragment_spirv }).value;
vk::PipelineShaderStageCreateInfo vertex_ci; vk::PipelineShaderStageCreateInfo vertex_ci;
vertex_ci.setStage(vk::ShaderStageFlagBits::eVertex) vertex_ci.setStage(vk::ShaderStageFlagBits::eVertex)
@ -182,14 +182,14 @@ void SimpleOutput::create_pipeline()
.setDescriptorType(vk::DescriptorType::eCombinedImageSampler); .setDescriptorType(vk::DescriptorType::eCombinedImageSampler);
vk::DescriptorSetLayoutCreateInfo dslci{}; vk::DescriptorSetLayoutCreateInfo dslci{};
dslci.setBindings(dslb); dslci.setBindings(dslb);
descriptor_set_layout = device.createDescriptorSetLayoutUnique(dslci); descriptor_set_layout = device.createDescriptorSetLayoutUnique(dslci).value;
vk::PipelineLayoutCreateInfo pipeline_layout_info; vk::PipelineLayoutCreateInfo pipeline_layout_info;
pipeline_layout_info.setSetLayoutCount(0) pipeline_layout_info.setSetLayoutCount(0)
.setPushConstantRangeCount(0) .setPushConstantRangeCount(0)
.setSetLayouts(descriptor_set_layout.get()); .setSetLayouts(descriptor_set_layout.get());
pipeline_layout = device.createPipelineLayoutUnique(pipeline_layout_info); pipeline_layout = device.createPipelineLayoutUnique(pipeline_layout_info).value;
vk::GraphicsPipelineCreateInfo pipeline_create_info; vk::GraphicsPipelineCreateInfo pipeline_create_info;
pipeline_create_info.setStageCount(2) pipeline_create_info.setStageCount(2)

View File

@ -156,10 +156,10 @@ bool SlangPipeline::generate_pipeline(bool lastpass)
.setDependencies(subpass_dependency) .setDependencies(subpass_dependency)
.setAttachments(attachment_description); .setAttachments(attachment_description);
render_pass = device.createRenderPassUnique(render_pass_create_info); render_pass = device.createRenderPassUnique(render_pass_create_info).value;
auto vertex_module = device.createShaderModuleUnique({ {}, shader->vertex_shader_spirv }); auto vertex_module = device.createShaderModuleUnique({ {}, shader->vertex_shader_spirv }).value;
auto fragment_module = device.createShaderModuleUnique({ {}, shader->fragment_shader_spirv }); auto fragment_module = device.createShaderModuleUnique({ {}, shader->fragment_shader_spirv }).value;
auto vertex_ci = vk::PipelineShaderStageCreateInfo{} auto vertex_ci = vk::PipelineShaderStageCreateInfo{}
.setStage(vk::ShaderStageFlagBits::eVertex) .setStage(vk::ShaderStageFlagBits::eVertex)
@ -278,7 +278,7 @@ bool SlangPipeline::generate_pipeline(bool lastpass)
auto dslci = vk::DescriptorSetLayoutCreateInfo{} auto dslci = vk::DescriptorSetLayoutCreateInfo{}
.setBindings(descriptor_set_layout_bindings); .setBindings(descriptor_set_layout_bindings);
descriptor_set_layout = device.createDescriptorSetLayoutUnique(dslci); descriptor_set_layout = device.createDescriptorSetLayoutUnique(dslci).value;
vk::PushConstantRange pcr(vk::ShaderStageFlagBits::eAllGraphics, 0, shader->push_constant_block_size); vk::PushConstantRange pcr(vk::ShaderStageFlagBits::eAllGraphics, 0, shader->push_constant_block_size);
@ -289,7 +289,7 @@ bool SlangPipeline::generate_pipeline(bool lastpass)
if (shader->push_constant_block_size > 0) if (shader->push_constant_block_size > 0)
pipeline_layout_info.setPushConstantRanges(pcr); pipeline_layout_info.setPushConstantRanges(pcr);
pipeline_layout = device.createPipelineLayoutUnique(pipeline_layout_info); pipeline_layout = device.createPipelineLayoutUnique(pipeline_layout_info).value;
auto pipeline_create_info = vk::GraphicsPipelineCreateInfo{} auto pipeline_create_info = vk::GraphicsPipelineCreateInfo{}
.setStageCount(2) .setStageCount(2)
@ -343,11 +343,11 @@ bool SlangPipeline::generate_frame_resources(vk::DescriptorPool pool)
vk::DescriptorSetAllocateInfo descriptor_set_allocate_info(pool, descriptor_set_layout.get()); vk::DescriptorSetAllocateInfo descriptor_set_allocate_info(pool, descriptor_set_layout.get());
auto result = device.allocateDescriptorSetsUnique(descriptor_set_allocate_info); auto result = device.allocateDescriptorSetsUnique(descriptor_set_allocate_info).value;
f.descriptor_set = std::move(result[0]); f.descriptor_set = std::move(result[0]);
} }
semaphore = device.createSemaphoreUnique({}); semaphore = device.createSemaphoreUnique({}).value;
push_constants.resize(shader->push_constant_block_size); push_constants.resize(shader->push_constant_block_size);
@ -361,7 +361,7 @@ bool SlangPipeline::generate_frame_resources(vk::DescriptorPool pool)
.setFlags(vma::AllocationCreateFlagBits::eHostAccessSequentialWrite) .setFlags(vma::AllocationCreateFlagBits::eHostAccessSequentialWrite)
.setRequiredFlags(vk::MemoryPropertyFlagBits::eHostVisible); .setRequiredFlags(vk::MemoryPropertyFlagBits::eHostVisible);
std::tie(uniform_buffer, uniform_buffer_allocation) = context->allocator.createBuffer(buffer_create_info, allocation_create_info); std::tie(uniform_buffer, uniform_buffer_allocation) = context->allocator.createBuffer(buffer_create_info, allocation_create_info).value;
} }
else else
{ {
@ -385,7 +385,7 @@ bool SlangPipeline::generate_frame_resources(vk::DescriptorPool pool)
.setMaxLod(VK_LOD_CLAMP_NONE) .setMaxLod(VK_LOD_CLAMP_NONE)
.setAnisotropyEnable(false); .setAnisotropyEnable(false);
sampler = device.createSamplerUnique(sampler_create_info); sampler = device.createSamplerUnique(sampler_create_info).value;
return true; return true;
} }

View File

@ -75,7 +75,7 @@ void Swapchain::create_render_pass()
.setDependencies(subpass_dependency) .setDependencies(subpass_dependency)
.setAttachments(attachment_description); .setAttachments(attachment_description);
render_pass = device.createRenderPassUnique(render_pass_create_info); render_pass = device.createRenderPassUnique(render_pass_create_info).value;
} }
bool Swapchain::recreate(int new_width, int new_height) bool Swapchain::recreate(int new_width, int new_height)
@ -95,7 +95,7 @@ bool Swapchain::check_and_resize(int width, int height)
if (width == -1 && height == -1) if (width == -1 && height == -1)
{ {
surface_capabilities = physical_device.getSurfaceCapabilitiesKHR(surface); surface_capabilities = physical_device.getSurfaceCapabilitiesKHR(surface).value;
width = surface_capabilities.currentExtent.width; width = surface_capabilities.currentExtent.width;
height = surface_capabilities.currentExtent.height; height = surface_capabilities.currentExtent.height;
} }
@ -117,7 +117,7 @@ bool Swapchain::create(unsigned int desired_num_swapchain_images, int new_width,
frames.clear(); frames.clear();
imageviewfbs.clear(); imageviewfbs.clear();
auto surface_capabilities = physical_device.getSurfaceCapabilitiesKHR(surface); auto surface_capabilities = physical_device.getSurfaceCapabilitiesKHR(surface).value;
if (surface_capabilities.minImageCount > desired_num_swapchain_images) if (surface_capabilities.minImageCount > desired_num_swapchain_images)
num_swapchain_images = surface_capabilities.minImageCount; num_swapchain_images = surface_capabilities.minImageCount;
@ -163,7 +163,7 @@ bool Swapchain::create(unsigned int desired_num_swapchain_images, int new_width,
if (extents.height < surface_capabilities.minImageExtent.height) if (extents.height < surface_capabilities.minImageExtent.height)
extents.height = surface_capabilities.minImageExtent.height; extents.height = surface_capabilities.minImageExtent.height;
auto present_modes = physical_device.getSurfacePresentModesKHR(surface); auto present_modes = physical_device.getSurfacePresentModesKHR(surface).value;
auto tearing_present_mode = vk::PresentModeKHR::eFifo; auto tearing_present_mode = vk::PresentModeKHR::eFifo;
if (std::find(present_modes.begin(), present_modes.end(), vk::PresentModeKHR::eImmediate) != present_modes.end()) if (std::find(present_modes.begin(), present_modes.end(), vk::PresentModeKHR::eImmediate) != present_modes.end())
tearing_present_mode = vk::PresentModeKHR::eImmediate; tearing_present_mode = vk::PresentModeKHR::eImmediate;
@ -189,7 +189,7 @@ bool Swapchain::create(unsigned int desired_num_swapchain_images, int new_width,
swapchain_create_info.setOldSwapchain(swapchain_object.get()); swapchain_create_info.setOldSwapchain(swapchain_object.get());
try { try {
swapchain_object = device.createSwapchainKHRUnique(swapchain_create_info); swapchain_object = device.createSwapchainKHRUnique(swapchain_create_info).value;
} catch (std::exception &e) { } catch (std::exception &e) {
swapchain_object.reset(); swapchain_object.reset();
} }
@ -197,9 +197,9 @@ bool Swapchain::create(unsigned int desired_num_swapchain_images, int new_width,
if (!swapchain_object) if (!swapchain_object)
return false; return false;
auto swapchain_images = device.getSwapchainImagesKHR(swapchain_object.get()); auto swapchain_images = device.getSwapchainImagesKHR(swapchain_object.get()).value;
vk::CommandBufferAllocateInfo command_buffer_allocate_info(command_pool, vk::CommandBufferLevel::ePrimary, swapchain_images.size()); vk::CommandBufferAllocateInfo command_buffer_allocate_info(command_pool, vk::CommandBufferLevel::ePrimary, swapchain_images.size());
auto command_buffers = device.allocateCommandBuffersUnique(command_buffer_allocate_info); auto command_buffers = device.allocateCommandBuffersUnique(command_buffer_allocate_info).value;
if (imageviewfbs.size() > num_swapchain_images) if (imageviewfbs.size() > num_swapchain_images)
num_swapchain_images = imageviewfbs.size(); num_swapchain_images = imageviewfbs.size();
@ -214,9 +214,9 @@ bool Swapchain::create(unsigned int desired_num_swapchain_images, int new_width,
// Create frame queue resources // Create frame queue resources
auto &frame = frames[i]; auto &frame = frames[i];
frame.command_buffer = std::move(command_buffers[i]); frame.command_buffer = std::move(command_buffers[i]);
frame.fence = device.createFenceUnique(fence_create_info); frame.fence = device.createFenceUnique(fence_create_info).value;
frame.acquire = device.createSemaphoreUnique({}); frame.acquire = device.createSemaphoreUnique({}).value;
frame.complete = device.createSemaphoreUnique({}); frame.complete = device.createSemaphoreUnique({}).value;
} }
current_frame = 0; current_frame = 0;
@ -231,7 +231,7 @@ bool Swapchain::create(unsigned int desired_num_swapchain_images, int new_width,
.setFormat(vk::Format::eB8G8R8A8Unorm) .setFormat(vk::Format::eB8G8R8A8Unorm)
.setComponents(vk::ComponentMapping()) .setComponents(vk::ComponentMapping())
.setSubresourceRange(vk::ImageSubresourceRange(vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1)); .setSubresourceRange(vk::ImageSubresourceRange(vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1));
image.image_view = device.createImageViewUnique(image_view_create_info); image.image_view = device.createImageViewUnique(image_view_create_info).value;
auto framebuffer_create_info = vk::FramebufferCreateInfo{} auto framebuffer_create_info = vk::FramebufferCreateInfo{}
.setAttachments(image.image_view.get()) .setAttachments(image.image_view.get())
@ -239,7 +239,7 @@ bool Swapchain::create(unsigned int desired_num_swapchain_images, int new_width,
.setHeight(extents.height) .setHeight(extents.height)
.setLayers(1) .setLayers(1)
.setRenderPass(render_pass.get()); .setRenderPass(render_pass.get());
image.framebuffer = device.createFramebufferUnique(framebuffer_create_info); image.framebuffer = device.createFramebufferUnique(framebuffer_create_info).value;
} }
device.waitIdle(); device.waitIdle();
@ -267,12 +267,8 @@ bool Swapchain::begin_frame()
} }
vk::ResultValue<uint32_t> result_value(vk::Result::eSuccess, 0); vk::ResultValue<uint32_t> result_value(vk::Result::eSuccess, 0);
try { result_value = device.acquireNextImageKHR(swapchain_object.get(), UINT64_MAX, frame.acquire.get());
result_value = device.acquireNextImageKHR(swapchain_object.get(), UINT64_MAX, frame.acquire.get());
} catch (vk::OutOfDateKHRError &e) {
result_value.result = vk::Result::eErrorOutOfDateKHR;
}
if (result_value.result == vk::Result::eErrorOutOfDateKHR || if (result_value.result == vk::Result::eErrorOutOfDateKHR ||
result_value.result == vk::Result::eSuboptimalKHR) result_value.result == vk::Result::eSuboptimalKHR)
{ {
@ -325,14 +321,12 @@ bool Swapchain::swap()
.setImageIndices(current_swapchain_image); .setImageIndices(current_swapchain_image);
vk::Result result = vk::Result::eSuccess; vk::Result result = vk::Result::eSuccess;
try { result = queue.presentKHR(present_info);
result = queue.presentKHR(present_info); if (result == vk::Result::eErrorOutOfDateKHR)
} catch (vk::OutOfDateKHRError &e) { {
// NVIDIA binary drivers will set OutOfDate between acquire and // NVIDIA binary drivers will set OutOfDate between acquire and
// present. Ignore this and fix it on the next swapchain acquire. // present. Ignore this and fix it on the next swapchain acquire.
} catch (std::exception &e) { }
printf("%s\n", e.what());
}
current_frame = (current_frame + 1) % num_swapchain_images; current_frame = (current_frame + 1) % num_swapchain_images;

View File

@ -91,7 +91,7 @@ void Texture::from_buffer(vk::CommandBuffer cmd,
byte_stride = pixel_size * width; byte_stride = pixel_size * width;
} }
auto map = allocator.mapMemory(buffer_allocation); auto map = allocator.mapMemory(buffer_allocation).value;
for (int y = 0; y < height; y++) for (int y = 0; y < height; y++)
{ {
auto src = buffer + byte_stride * y; auto src = buffer + byte_stride * y;
@ -206,7 +206,7 @@ void Texture::from_buffer(vk::CommandBuffer cmd,
void Texture::from_buffer(uint8_t *buffer, int width, int height, int byte_stride) void Texture::from_buffer(uint8_t *buffer, int width, int height, int byte_stride)
{ {
vk::CommandBufferAllocateInfo cbai(command_pool, vk::CommandBufferLevel::ePrimary, 1); vk::CommandBufferAllocateInfo cbai(command_pool, vk::CommandBufferLevel::ePrimary, 1);
auto command_buffer_vector = device.allocateCommandBuffersUnique(cbai); auto command_buffer_vector = device.allocateCommandBuffersUnique(cbai).value;
auto &cmd = command_buffer_vector[0]; auto &cmd = command_buffer_vector[0];
cmd->begin({ vk::CommandBufferUsageFlagBits::eOneTimeSubmit }); cmd->begin({ vk::CommandBufferUsageFlagBits::eOneTimeSubmit });
from_buffer(cmd.get(), buffer, width, height, byte_stride); from_buffer(cmd.get(), buffer, width, height, byte_stride);
@ -241,7 +241,7 @@ void Texture::create(int width, int height, vk::Format fmt, vk::SamplerAddressMo
.setSamples(vk::SampleCountFlagBits::e1) .setSamples(vk::SampleCountFlagBits::e1)
.setSharingMode(vk::SharingMode::eExclusive); .setSharingMode(vk::SharingMode::eExclusive);
std::tie(image, image_allocation) = allocator.createImage(ici, aci); std::tie(image, image_allocation) = allocator.createImage(ici, aci).value;
buffer_size = width * height * 4; buffer_size = width * height * 4;
if (format == vk::Format::eR5G6B5UnormPack16) if (format == vk::Format::eR5G6B5UnormPack16)
@ -254,7 +254,7 @@ void Texture::create(int width, int height, vk::Format fmt, vk::SamplerAddressMo
.setFlags(vma::AllocationCreateFlagBits::eHostAccessSequentialWrite) .setFlags(vma::AllocationCreateFlagBits::eHostAccessSequentialWrite)
.setUsage(vma::MemoryUsage::eAutoPreferHost); .setUsage(vma::MemoryUsage::eAutoPreferHost);
std::tie(buffer, buffer_allocation) = allocator.createBuffer(bci, aci); std::tie(buffer, buffer_allocation) = allocator.createBuffer(bci, aci).value;
auto isrr = vk::ImageSubresourceRange{} auto isrr = vk::ImageSubresourceRange{}
.setAspectMask(vk::ImageAspectFlagBits::eColor) .setAspectMask(vk::ImageAspectFlagBits::eColor)
@ -269,7 +269,7 @@ void Texture::create(int width, int height, vk::Format fmt, vk::SamplerAddressMo
.setComponents(vk::ComponentMapping()) .setComponents(vk::ComponentMapping())
.setSubresourceRange(isrr); .setSubresourceRange(isrr);
image_view = device.createImageView(ivci); image_view = device.createImageView(ivci).value;
image_width = width; image_width = width;
image_height = height; image_height = height;
@ -293,7 +293,7 @@ void Texture::create(int width, int height, vk::Format fmt, vk::SamplerAddressMo
.setMaxLod(10000.0f) .setMaxLod(10000.0f)
.setMipmapMode(vk::SamplerMipmapMode::eLinear); .setMipmapMode(vk::SamplerMipmapMode::eLinear);
sampler = device.createSampler(sampler_create_info); sampler = device.createSampler(sampler_create_info).value;
} }
void Texture::discard_staging_buffer() void Texture::discard_staging_buffer()

View File

@ -29,7 +29,7 @@ bool CVulkan::InitImGui()
.setPoolSizes(pool_sizes) .setPoolSizes(pool_sizes)
.setMaxSets(1000) .setMaxSets(1000)
.setFlags(vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet); .setFlags(vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet);
imgui_descriptor_pool = context->device.createDescriptorPoolUnique(descriptor_pool_create_info); imgui_descriptor_pool = context->device.createDescriptorPoolUnique(descriptor_pool_create_info).value;
ImGui_ImplVulkan_InitInfo init_info{}; ImGui_ImplVulkan_InitInfo init_info{};
init_info.Instance = context->instance.get(); init_info.Instance = context->instance.get();
@ -286,4 +286,4 @@ std::function<void(const char *)> CVulkan::GetShaderParametersSaveFunction()
if (shaderchain) if (shaderchain)
shaderchain->preset->save_to_file(filename); shaderchain->preset->save_to_file(filename);
}; };
} }

View File

@ -118,7 +118,7 @@
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\;$(ProjectDir)..\..\;$(ProjectDir)zlib\src;$(ProjectDir)..\unzip;$(ProjectDir)libpng\src;$(ProjectDir)..\apu\bapu;$(ProjectDir)..\external\glslang;$(ProjectDir)..\external\stb;$(ProjectDir)..\external\vulkan-headers\include;$(ProjectDir)..\external\VulkanMemoryAllocator-Hpp\include;$(ProjectDir)..\external\fmt\include;$(ProjectDir)..\external\imgui</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\;$(ProjectDir)..\..\;$(ProjectDir)zlib\src;$(ProjectDir)..\unzip;$(ProjectDir)libpng\src;$(ProjectDir)..\apu\bapu;$(ProjectDir)..\external\glslang;$(ProjectDir)..\external\stb;$(ProjectDir)..\external\vulkan-headers\include;$(ProjectDir)..\external\VulkanMemoryAllocator-Hpp\include;$(ProjectDir)..\external\fmt\include;$(ProjectDir)..\external\imgui</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;ALLOW_CPU_OVERCLOCK;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;NETPLAY_SUPPORT;D3D_DEBUG_INFO;DIRECTDRAW_SUPPORT;USE_SLANG;%(PreprocessorDefinitions);VK_USE_PLATFORM_WIN32_KHR;VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1;VMA_DYNAMIC_VULKAN_FUNCTIONS=1;VMA_STATIC_VULKAN_FUNCTIONS=0;VMA_USE_STL_SHARED_MUTEX=0;IMGUI_IMPL_VULKAN_NO_PROTOTYPES</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;ALLOW_CPU_OVERCLOCK;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;NETPLAY_SUPPORT;D3D_DEBUG_INFO;DIRECTDRAW_SUPPORT;USE_SLANG;%(PreprocessorDefinitions);VK_USE_PLATFORM_WIN32_KHR;VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1;VULKAN_HPP_NO_EXCEPTIONS=1;VULKAN_HPP_NO_DISCARD_WARNINGS=1;VMA_DYNAMIC_VULKAN_FUNCTIONS=1;VMA_STATIC_VULKAN_FUNCTIONS=0;VMA_USE_STL_SHARED_MUTEX=0;IMGUI_IMPL_VULKAN_NO_PROTOTYPES</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<StructMemberAlignment>Default</StructMemberAlignment> <StructMemberAlignment>Default</StructMemberAlignment>
<PrecompiledHeader /> <PrecompiledHeader />
@ -169,7 +169,7 @@
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\;$(ProjectDir)..\..\;$(ProjectDir)zlib\src;$(ProjectDir)..\unzip;$(ProjectDir)libpng\src;$(ProjectDir)..\apu\bapu;$(ProjectDir)..\external\glslang;$(ProjectDir)..\external\stb;$(ProjectDir)..\external\vulkan-headers\include;$(ProjectDir)..\external\VulkanMemoryAllocator-Hpp\include;$(ProjectDir)..\external\fmt\include;$(ProjectDir)..\external\imgui</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\;$(ProjectDir)..\..\;$(ProjectDir)zlib\src;$(ProjectDir)..\unzip;$(ProjectDir)libpng\src;$(ProjectDir)..\apu\bapu;$(ProjectDir)..\external\glslang;$(ProjectDir)..\external\stb;$(ProjectDir)..\external\vulkan-headers\include;$(ProjectDir)..\external\VulkanMemoryAllocator-Hpp\include;$(ProjectDir)..\external\fmt\include;$(ProjectDir)..\external\imgui</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;ALLOW_CPU_OVERCLOCK;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;NETPLAY_SUPPORT;D3D_DEBUG_INFO;DIRECTDRAW_SUPPORT;USE_SLANG;%(PreprocessorDefinitions);VK_USE_PLATFORM_WIN32_KHR;VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1;VMA_DYNAMIC_VULKAN_FUNCTIONS=1;VMA_STATIC_VULKAN_FUNCTIONS=0;VMA_USE_STL_SHARED_MUTEX=0;IMGUI_IMPL_VULKAN_NO_PROTOTYPES</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;ALLOW_CPU_OVERCLOCK;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;NETPLAY_SUPPORT;D3D_DEBUG_INFO;DIRECTDRAW_SUPPORT;USE_SLANG;%(PreprocessorDefinitions);VK_USE_PLATFORM_WIN32_KHR;VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1;VULKAN_HPP_NO_EXCEPTIONS=1;VULKAN_HPP_NO_DISCARD_WARNINGS=1;VMA_DYNAMIC_VULKAN_FUNCTIONS=1;VMA_STATIC_VULKAN_FUNCTIONS=0;VMA_USE_STL_SHARED_MUTEX=0;IMGUI_IMPL_VULKAN_NO_PROTOTYPES</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<StructMemberAlignment>Default</StructMemberAlignment> <StructMemberAlignment>Default</StructMemberAlignment>
<PrecompiledHeader /> <PrecompiledHeader />
@ -225,7 +225,7 @@
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\;$(ProjectDir)..\..\;$(ProjectDir)zlib\src;$(ProjectDir)..\unzip;$(ProjectDir)libpng\src;$(ProjectDir)..\apu\bapu;$(ProjectDir)..\external\glslang;$(ProjectDir)..\external\stb;$(ProjectDir)..\external\vulkan-headers\include;$(ProjectDir)..\external\VulkanMemoryAllocator-Hpp\include;$(ProjectDir)..\external\fmt\include;$(ProjectDir)..\external\imgui</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\;$(ProjectDir)..\..\;$(ProjectDir)zlib\src;$(ProjectDir)..\unzip;$(ProjectDir)libpng\src;$(ProjectDir)..\apu\bapu;$(ProjectDir)..\external\glslang;$(ProjectDir)..\external\stb;$(ProjectDir)..\external\vulkan-headers\include;$(ProjectDir)..\external\VulkanMemoryAllocator-Hpp\include;$(ProjectDir)..\external\fmt\include;$(ProjectDir)..\external\imgui</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;ALLOW_CPU_OVERCLOCK;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;NETPLAY_SUPPORT;DIRECTDRAW_SUPPORT;USE_SLANG;%(PreprocessorDefinitions);VK_USE_PLATFORM_WIN32_KHR;VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1;VMA_DYNAMIC_VULKAN_FUNCTIONS=1;VMA_STATIC_VULKAN_FUNCTIONS=0;VMA_USE_STL_SHARED_MUTEX=0;IMGUI_IMPL_VULKAN_NO_PROTOTYPES</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;ALLOW_CPU_OVERCLOCK;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;NETPLAY_SUPPORT;DIRECTDRAW_SUPPORT;USE_SLANG;%(PreprocessorDefinitions);VK_USE_PLATFORM_WIN32_KHR;VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1;VULKAN_HPP_NO_EXCEPTIONS=1;VULKAN_HPP_NO_DISCARD_WARNINGS=1;VMA_DYNAMIC_VULKAN_FUNCTIONS=1;VMA_STATIC_VULKAN_FUNCTIONS=0;VMA_USE_STL_SHARED_MUTEX=0;IMGUI_IMPL_VULKAN_NO_PROTOTYPES</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<StructMemberAlignment>Default</StructMemberAlignment> <StructMemberAlignment>Default</StructMemberAlignment>
@ -280,7 +280,7 @@
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\;$(ProjectDir)..\..\;$(ProjectDir)zlib\src;$(ProjectDir)..\unzip;$(ProjectDir)libpng\src;$(ProjectDir)..\apu\bapu;$(ProjectDir)..\external\glslang;$(ProjectDir)..\external\stb;$(ProjectDir)..\external\vulkan-headers\include;$(ProjectDir)..\external\VulkanMemoryAllocator-Hpp\include;$(ProjectDir)..\external\fmt\include;$(ProjectDir)..\external\imgui</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\;$(ProjectDir)..\..\;$(ProjectDir)zlib\src;$(ProjectDir)..\unzip;$(ProjectDir)libpng\src;$(ProjectDir)..\apu\bapu;$(ProjectDir)..\external\glslang;$(ProjectDir)..\external\stb;$(ProjectDir)..\external\vulkan-headers\include;$(ProjectDir)..\external\VulkanMemoryAllocator-Hpp\include;$(ProjectDir)..\external\fmt\include;$(ProjectDir)..\external\imgui</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;ALLOW_CPU_OVERCLOCK;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;NETPLAY_SUPPORT;DIRECTDRAW_SUPPORT;USE_SLANG;%(PreprocessorDefinitions);VK_USE_PLATFORM_WIN32_KHR;VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1;VMA_DYNAMIC_VULKAN_FUNCTIONS=1;VMA_STATIC_VULKAN_FUNCTIONS=0;VMA_USE_STL_SHARED_MUTEX=0;IMGUI_IMPL_VULKAN_NO_PROTOTYPES</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;ALLOW_CPU_OVERCLOCK;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;NETPLAY_SUPPORT;DIRECTDRAW_SUPPORT;USE_SLANG;%(PreprocessorDefinitions);VK_USE_PLATFORM_WIN32_KHR;VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1;VULKAN_HPP_NO_EXCEPTIONS=1;VULKAN_HPP_NO_DISCARD_WARNINGS=1;VMA_DYNAMIC_VULKAN_FUNCTIONS=1;VMA_STATIC_VULKAN_FUNCTIONS=0;VMA_USE_STL_SHARED_MUTEX=0;IMGUI_IMPL_VULKAN_NO_PROTOTYPES</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<StructMemberAlignment>Default</StructMemberAlignment> <StructMemberAlignment>Default</StructMemberAlignment>
@ -708,4 +708,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>
</Project> </Project>