mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[dxvk] Enable VK_KHR_draw_indirect_count if available
Useful to implement a corresponding D3D11 extension.
This commit is contained in:
parent
66b6b50af6
commit
13359d68d7
@ -240,7 +240,7 @@ namespace dxvk {
|
||||
Rc<DxvkDevice> DxvkAdapter::createDevice(std::string clientApi, DxvkDeviceFeatures enabledFeatures) {
|
||||
DxvkDeviceExtensions devExtensions;
|
||||
|
||||
std::array<DxvkExt*, 19> devExtensionList = {{
|
||||
std::array<DxvkExt*, 20> devExtensionList = {{
|
||||
&devExtensions.amdMemoryOverallocationBehaviour,
|
||||
&devExtensions.amdShaderFragmentMask,
|
||||
&devExtensions.extConditionalRendering,
|
||||
@ -252,6 +252,7 @@ namespace dxvk {
|
||||
&devExtensions.extVertexAttributeDivisor,
|
||||
&devExtensions.khrDedicatedAllocation,
|
||||
&devExtensions.khrDescriptorUpdateTemplate,
|
||||
&devExtensions.khrDrawIndirectCount,
|
||||
&devExtensions.khrDriverProperties,
|
||||
&devExtensions.khrGetMemoryRequirements2,
|
||||
&devExtensions.khrImageFormatList,
|
||||
|
@ -463,6 +463,18 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void cmdDrawIndirectCount(
|
||||
VkBuffer buffer,
|
||||
VkDeviceSize offset,
|
||||
VkBuffer countBuffer,
|
||||
VkDeviceSize countOffset,
|
||||
uint32_t maxDrawCount,
|
||||
uint32_t stride) {
|
||||
m_vkd->vkCmdDrawIndirectCountKHR(m_execBuffer,
|
||||
buffer, offset, countBuffer, countOffset, maxDrawCount, stride);
|
||||
}
|
||||
|
||||
|
||||
void cmdDrawIndexed(
|
||||
uint32_t indexCount,
|
||||
uint32_t instanceCount,
|
||||
@ -486,6 +498,18 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void cmdDrawIndexedIndirectCount(
|
||||
VkBuffer buffer,
|
||||
VkDeviceSize offset,
|
||||
VkBuffer countBuffer,
|
||||
VkDeviceSize countOffset,
|
||||
uint32_t maxDrawCount,
|
||||
uint32_t stride) {
|
||||
m_vkd->vkCmdDrawIndexedIndirectCountKHR(m_execBuffer,
|
||||
buffer, offset, countBuffer, countOffset, maxDrawCount, stride);
|
||||
}
|
||||
|
||||
|
||||
void cmdDrawIndirectVertexCount(
|
||||
uint32_t instanceCount,
|
||||
uint32_t firstInstance,
|
||||
|
@ -268,6 +268,7 @@ namespace dxvk {
|
||||
DxvkExt extVertexAttributeDivisor = { VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt khrDedicatedAllocation = { VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME, DxvkExtMode::Required };
|
||||
DxvkExt khrDescriptorUpdateTemplate = { VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME, DxvkExtMode::Required };
|
||||
DxvkExt khrDrawIndirectCount = { VK_KHR_DRAW_INDIRECT_COUNT_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt khrDriverProperties = { VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt khrGetMemoryRequirements2 = { VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME, DxvkExtMode::Required };
|
||||
DxvkExt khrImageFormatList = { VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME, DxvkExtMode::Required };
|
||||
|
@ -273,6 +273,11 @@ namespace dxvk::vk {
|
||||
VULKAN_FN(vkUpdateDescriptorSetWithTemplateKHR);
|
||||
VULKAN_FN(vkCmdPushDescriptorSetWithTemplateKHR);
|
||||
#endif
|
||||
|
||||
#ifdef VK_KHR_draw_indirect_count
|
||||
VULKAN_FN(vkCmdDrawIndirectCountKHR);
|
||||
VULKAN_FN(vkCmdDrawIndexedIndirectCountKHR);
|
||||
#endif
|
||||
|
||||
#ifdef VK_KHR_swapchain
|
||||
VULKAN_FN(vkCreateSwapchainKHR);
|
||||
|
Loading…
x
Reference in New Issue
Block a user