Skip to content

Commit

Permalink
use vulkan 1.3
Browse files Browse the repository at this point in the history
For some reason, I need to use vkGetPhysicalDeviceMemoryProperties2
instead of vkGetPhysicalDeviceMemoryProperties2KHR here. See this
issue for details:

GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator#410
  • Loading branch information
kusma committed Aug 3, 2024
1 parent e14c5be commit bfb51ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion data/shaders/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ foreach s : sources
infile = files(join_paths('..', '..', 'src', 'shaders', s))
outfile = s + '.spv'
custom_target(outfile, input : infile, output : outfile,
command : [glslang, '-V', '@INPUT@', '-o', '@OUTPUT@'],
command : [glslang, '-V', '--target-env', 'vulkan1.3', '@INPUT@',
'-o', '@OUTPUT@'],
build_by_default : true,
install : true,
install_dir : 'data/shaders/')
Expand Down
6 changes: 3 additions & 3 deletions src/vkinstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void vkInstance::instanceInit(const char *appName, const vector<const char *> &e
appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
appInfo.pApplicationName = appName;
appInfo.pEngineName = "very lastest engine ever";
appInfo.apiVersion = VK_API_VERSION_1_0;
appInfo.apiVersion = VK_API_VERSION_1_3;

VkInstanceCreateInfo instanceCreateInfo = {};
instanceCreateInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
Expand Down Expand Up @@ -186,15 +186,15 @@ void vkInstance::deviceInit(VkPhysicalDevice physicalDevice, function<bool(VkIns
P(vkGetImageMemoryRequirements2KHR)
P(vkBindBufferMemory2KHR)
P(vkBindImageMemory2KHR)
P(vkGetPhysicalDeviceMemoryProperties2KHR)
.vkGetPhysicalDeviceMemoryProperties2KHR = vkGetPhysicalDeviceMemoryProperties2,
P(vkGetDeviceBufferMemoryRequirements)
P(vkGetDeviceImageMemoryRequirements)
#undef P
};

VmaAllocatorCreateInfo allocatorCreateInfo = {};
allocatorCreateInfo.flags = 0;
allocatorCreateInfo.vulkanApiVersion = VK_API_VERSION_1_0;
allocatorCreateInfo.vulkanApiVersion = deviceProperties.apiVersion;
allocatorCreateInfo.physicalDevice = physicalDevice;
allocatorCreateInfo.device = device;
allocatorCreateInfo.instance = instance;
Expand Down

0 comments on commit bfb51ac

Please sign in to comment.