Skip to content

Commit

Permalink
Vulkan: mark descriptor samplers on draw
Browse files Browse the repository at this point in the history
  • Loading branch information
goeiecool9999 committed Nov 5, 2024
1 parent 7ce6ab7 commit 45afeaa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRendererCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,12 @@ void VulkanRenderer::draw_execute(uint32 baseVertex, uint32 baseInstance, uint32
draw_updateVkBlendConstants();

// update descriptor sets
auto markSamplers = [this](VkDescriptorSetInfo* info) {
if(!info)
return;
for(auto& sampler : info->m_vkObjSamplers)
sampler->flagForCurrentCommandBuffer();
};
uint32_t dynamicOffsets[17 * 2];
if (vertexDS && pixelDS)
{
Expand Down Expand Up @@ -1585,6 +1591,9 @@ void VulkanRenderer::draw_execute(uint32 baseVertex, uint32 baseInstance, uint32
vkObjPipeline->pipeline_layout, 2, 1, &geometryDS->m_vkObjDescriptorSet->descriptorSet, numDynOffsets,
dynamicOffsets);
}
markSamplers(vertexDS);
markSamplers(pixelDS);
markSamplers(geometryDS);

// draw
if (hostIndexType != INDEX_TYPE::NONE)
Expand Down

0 comments on commit 45afeaa

Please sign in to comment.