mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxvk] Move dynamic descriptor offset array to stack
There's absolutely no reason to store it in the object.
This commit is contained in:
parent
a743ba6531
commit
7df3b409c3
@ -3954,12 +3954,14 @@ namespace dxvk {
|
|||||||
void DxvkContext::updateShaderDescriptorSetBinding(
|
void DxvkContext::updateShaderDescriptorSetBinding(
|
||||||
VkDescriptorSet set,
|
VkDescriptorSet set,
|
||||||
const DxvkPipelineLayout* layout) {
|
const DxvkPipelineLayout* layout) {
|
||||||
if (set != VK_NULL_HANDLE) {
|
if (set) {
|
||||||
|
std::array<uint32_t, MaxNumActiveBindings> offsets;
|
||||||
|
|
||||||
for (uint32_t i = 0; i < layout->dynamicBindingCount(); i++) {
|
for (uint32_t i = 0; i < layout->dynamicBindingCount(); i++) {
|
||||||
const auto& binding = layout->dynamicBinding(i);
|
const auto& binding = layout->dynamicBinding(i);
|
||||||
const auto& res = m_rc[binding.slot];
|
const auto& res = m_rc[binding.slot];
|
||||||
|
|
||||||
m_descOffsets[i] = res.bufferSlice.defined()
|
offsets[i] = res.bufferSlice.defined()
|
||||||
? res.bufferSlice.getDynamicOffset()
|
? res.bufferSlice.getDynamicOffset()
|
||||||
: 0;
|
: 0;
|
||||||
}
|
}
|
||||||
@ -3967,7 +3969,7 @@ namespace dxvk {
|
|||||||
m_cmd->cmdBindDescriptorSet(BindPoint,
|
m_cmd->cmdBindDescriptorSet(BindPoint,
|
||||||
layout->pipelineLayout(), set,
|
layout->pipelineLayout(), set,
|
||||||
layout->dynamicBindingCount(),
|
layout->dynamicBindingCount(),
|
||||||
m_descOffsets.data());
|
offsets.data());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1029,7 +1029,6 @@ namespace dxvk {
|
|||||||
|
|
||||||
std::array<DxvkShaderResourceSlot, MaxNumResourceSlots> m_rc;
|
std::array<DxvkShaderResourceSlot, MaxNumResourceSlots> m_rc;
|
||||||
std::array<DxvkDescriptorInfo, MaxNumActiveBindings> m_descInfos;
|
std::array<DxvkDescriptorInfo, MaxNumActiveBindings> m_descInfos;
|
||||||
std::array<uint32_t, MaxNumActiveBindings> m_descOffsets;
|
|
||||||
|
|
||||||
std::array<DxvkGraphicsPipeline*, 4096> m_gpLookupCache = { };
|
std::array<DxvkGraphicsPipeline*, 4096> m_gpLookupCache = { };
|
||||||
std::array<DxvkComputePipeline*, 256> m_cpLookupCache = { };
|
std::array<DxvkComputePipeline*, 256> m_cpLookupCache = { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user