mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 01:24:11 +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(
|
||||
VkDescriptorSet set,
|
||||
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++) {
|
||||
const auto& binding = layout->dynamicBinding(i);
|
||||
const auto& res = m_rc[binding.slot];
|
||||
|
||||
m_descOffsets[i] = res.bufferSlice.defined()
|
||||
offsets[i] = res.bufferSlice.defined()
|
||||
? res.bufferSlice.getDynamicOffset()
|
||||
: 0;
|
||||
}
|
||||
@ -3967,7 +3969,7 @@ namespace dxvk {
|
||||
m_cmd->cmdBindDescriptorSet(BindPoint,
|
||||
layout->pipelineLayout(), set,
|
||||
layout->dynamicBindingCount(),
|
||||
m_descOffsets.data());
|
||||
offsets.data());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1029,7 +1029,6 @@ namespace dxvk {
|
||||
|
||||
std::array<DxvkShaderResourceSlot, MaxNumResourceSlots> m_rc;
|
||||
std::array<DxvkDescriptorInfo, MaxNumActiveBindings> m_descInfos;
|
||||
std::array<uint32_t, MaxNumActiveBindings> m_descOffsets;
|
||||
|
||||
std::array<DxvkGraphicsPipeline*, 4096> m_gpLookupCache = { };
|
||||
std::array<DxvkComputePipeline*, 256> m_cpLookupCache = { };
|
||||
|
Loading…
Reference in New Issue
Block a user