Cleanup, enable UI
This commit is contained in:
parent
ab899ff472
commit
03299b337f
1 changed files with 2 additions and 11 deletions
|
|
@ -1,9 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Vulkan Example - Using descriptor buffers via VK_EXT_descriptor_buffer
|
* Vulkan Example - Using descriptor buffers via VK_EXT_descriptor_buffer
|
||||||
*
|
*
|
||||||
* Code is work-in-progress
|
* Copyright (C) 2022-2023 by Sascha Willems - www.saschawillems.de
|
||||||
*
|
|
||||||
* Copyright (C) 2022 by Sascha Willems - www.saschawillems.de
|
|
||||||
*
|
*
|
||||||
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
||||||
*/
|
*/
|
||||||
|
|
@ -74,7 +72,6 @@ public:
|
||||||
|
|
||||||
enabledInstanceExtensions.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
|
enabledInstanceExtensions.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
|
||||||
|
|
||||||
enabledDeviceExtensions.push_back(VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME);
|
|
||||||
enabledDeviceExtensions.push_back(VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME);
|
enabledDeviceExtensions.push_back(VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME);
|
||||||
enabledDeviceExtensions.push_back(VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME);
|
enabledDeviceExtensions.push_back(VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME);
|
||||||
enabledDeviceExtensions.push_back(VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME);
|
enabledDeviceExtensions.push_back(VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME);
|
||||||
|
|
@ -196,9 +193,6 @@ public:
|
||||||
VkDeviceSize img_offset{ 0 };
|
VkDeviceSize img_offset{ 0 };
|
||||||
vkGetDescriptorSetLayoutBindingOffsetEXT(device, descriptorSetLayoutImages, 1, &img_offset);
|
vkGetDescriptorSetLayoutBindingOffsetEXT(device, descriptorSetLayoutImages, 1, &img_offset);
|
||||||
|
|
||||||
// @todo: check memory sizes
|
|
||||||
// @todo: check support for combined image samplers
|
|
||||||
|
|
||||||
VK_CHECK_RESULT(vulkanDevice->createBuffer(
|
VK_CHECK_RESULT(vulkanDevice->createBuffer(
|
||||||
VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT | VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT,
|
VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT | VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT,
|
||||||
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
|
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
|
||||||
|
|
@ -216,8 +210,6 @@ public:
|
||||||
resourceDescriptorBufferDeviceAddress.deviceAddress = getBufferDeviceAddress(resourceDescriptorBuffer.buffer);
|
resourceDescriptorBufferDeviceAddress.deviceAddress = getBufferDeviceAddress(resourceDescriptorBuffer.buffer);
|
||||||
imageDescriptorBufferDeviceAddress.deviceAddress = getBufferDeviceAddress(imageDescriptorBuffer.buffer);
|
imageDescriptorBufferDeviceAddress.deviceAddress = getBufferDeviceAddress(imageDescriptorBuffer.buffer);
|
||||||
|
|
||||||
// @todo: sizes
|
|
||||||
|
|
||||||
PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2KHR>(vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceProperties2KHR"));
|
PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2KHR>(vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceProperties2KHR"));
|
||||||
assert(vkGetPhysicalDeviceProperties2KHR);
|
assert(vkGetPhysicalDeviceProperties2KHR);
|
||||||
VkPhysicalDeviceProperties2KHR deviceProps2{};
|
VkPhysicalDeviceProperties2KHR deviceProps2{};
|
||||||
|
|
@ -338,8 +330,7 @@ public:
|
||||||
model.draw(drawCmdBuffers[i]);
|
model.draw(drawCmdBuffers[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo: UI still uses descriptors, mix and match problematic
|
drawUI(drawCmdBuffers[i]);
|
||||||
//drawUI(drawCmdBuffers[i]);
|
|
||||||
|
|
||||||
vkCmdEndRenderPass(drawCmdBuffers[i]);
|
vkCmdEndRenderPass(drawCmdBuffers[i]);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue