mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-13 19:29:14 +01:00
[dxvk] Clean up remaining object creation code
This commit is contained in:
parent
9ebeb8e502
commit
a76b5693f3
@ -305,10 +305,7 @@ namespace dxvk {
|
||||
{ VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, maxSets / 64 },
|
||||
{ VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, maxSets * 1 } }};
|
||||
|
||||
VkDescriptorPoolCreateInfo info;
|
||||
info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
|
||||
info.pNext = nullptr;
|
||||
info.flags = 0;
|
||||
VkDescriptorPoolCreateInfo info = { VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO };
|
||||
info.maxSets = maxSets;
|
||||
info.poolSizeCount = pools.size();
|
||||
info.pPoolSizes = pools.data();
|
||||
|
@ -58,10 +58,7 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
if (!event) {
|
||||
VkEventCreateInfo info;
|
||||
info.sType = VK_STRUCTURE_TYPE_EVENT_CREATE_INFO;
|
||||
info.pNext = nullptr;
|
||||
info.flags = 0;
|
||||
VkEventCreateInfo info = { VK_STRUCTURE_TYPE_EVENT_CREATE_INFO };
|
||||
|
||||
VkResult status = m_vkd->vkCreateEvent(
|
||||
m_vkd->device(), &info, nullptr, &event);
|
||||
|
@ -183,13 +183,9 @@ namespace dxvk {
|
||||
|
||||
|
||||
void DxvkGpuQueryAllocator::createQueryPool() {
|
||||
VkQueryPoolCreateInfo info;
|
||||
info.sType = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO;
|
||||
info.pNext = nullptr;
|
||||
info.flags = 0;
|
||||
VkQueryPoolCreateInfo info = { VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO };
|
||||
info.queryType = m_queryType;
|
||||
info.queryCount = m_queryPoolSize;
|
||||
info.pipelineStatistics = 0;
|
||||
|
||||
if (m_queryType == VK_QUERY_TYPE_PIPELINE_STATISTICS) {
|
||||
info.pipelineStatistics
|
||||
|
@ -407,17 +407,16 @@ namespace dxvk {
|
||||
result.memFlags = flags;
|
||||
result.priority = priority;
|
||||
|
||||
VkMemoryPriorityAllocateInfoEXT prio;
|
||||
prio.sType = VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT;
|
||||
prio.pNext = dedAllocInfo;
|
||||
VkMemoryPriorityAllocateInfoEXT prio = { VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT };
|
||||
prio.priority = priority;
|
||||
|
||||
VkMemoryAllocateInfo info;
|
||||
info.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
|
||||
info.pNext = useMemoryPriority ? &prio : prio.pNext;
|
||||
VkMemoryAllocateInfo info = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, dedAllocInfo };
|
||||
info.allocationSize = size;
|
||||
info.memoryTypeIndex = type->memTypeId;
|
||||
|
||||
if (useMemoryPriority)
|
||||
prio.pNext = std::exchange(info.pNext, &prio);
|
||||
|
||||
if (m_vkd->vkAllocateMemory(m_vkd->device(), &info, nullptr, &result.memHandle) != VK_SUCCESS)
|
||||
return DxvkDeviceMemory();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user