Vulkan: Use per-pipeline buffer robustness

And if the extension is not supported then fallback to enabling robust buffer access for all shaders.
This commit is contained in:
Exzap 2025-05-10 09:48:35 +02:00
parent 081ebead5f
commit 61484598fc
6 changed files with 96 additions and 12 deletions

View file

@ -38,11 +38,14 @@ public:
RendererShaderVk* m_vkPixelShader{};
RendererShaderVk* m_vkGeometryShader{};
bool InitFromCurrentGPUState(PipelineInfo* pipelineInfo, const LatteContextRegister& latteRegister, VKRObjectRenderPass* renderPassObj);
bool InitFromCurrentGPUState(PipelineInfo* pipelineInfo, const LatteContextRegister& latteRegister, VKRObjectRenderPass* renderPassObj, bool requireRobustBufferAccess);
void TrackAsCached(uint64 baseHash, uint64 pipelineStateHash); // stores pipeline to permanent cache if not yet cached. Must be called synchronously from render thread due to dependency on GPU state
static bool CalcRobustBufferAccessRequirement(LatteDecompilerShader* vertexShader, LatteDecompilerShader* pixelShader, LatteDecompilerShader* geometryShader);
VkPipelineLayout m_pipelineLayout;
VKRObjectRenderPass* m_renderPassObj{};
bool m_requestRobustBufferAccess{false};
/* shader stages */
std::vector<VkPipelineShaderStageCreateInfo> shaderStages;