mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-06 13:30:00 +00:00
fix(agc): release shader modules after pipeline creation
This commit is contained in:
1 parent
d70b899894
commit
d31100a0f2
2 files changed
+4
No files matched your search
@@ -3566,6 +3566,8 @@ VulkanDevice::IndirectOutcome VulkanDevice::dispatch(const ShaderRecompiler::Rec
|
||||
pipelineInfo.layout = objects->layout;
|
||||
if (profile && shader.spirv.size() > 100000) std::fprintf(stderr, "[dispatch] creating a pipeline for %zu SPIR-V words (program 0x%llx)\n", shader.spirv.size(), static_cast<unsigned long long>(programAddress));
|
||||
check(state->DeviceFunction<PFN_vkCreateComputePipelines>("vkCreateComputePipelines")(state->device, context.pipelineCache, 1, &pipelineInfo, nullptr, &objects->pipeline), "vkCreateComputePipelines");
|
||||
objects->destroyModule(objects->device, objects->module, nullptr);
|
||||
objects->module = VK_NULL_HANDLE;
|
||||
Graphics::LogPipelineStatistics_nid_no_patch(context, objects->pipeline);
|
||||
timing.Mark("pipeline_create");
|
||||
if (pipelineKey != 0) {
|
||||
|
||||
@@ -254,6 +254,8 @@ Pipeline::Pipeline(const Context& context, const State& state, const VertexInput
|
||||
pipelineInfo.renderPass = renderPass;
|
||||
timing.Mark("modules_and_state");
|
||||
Check(context.Function<PFN_vkCreateGraphicsPipelines>("vkCreateGraphicsPipelines")(context.device, context.pipelineCache, 1, &pipelineInfo, nullptr, &pipeline), "vkCreateGraphicsPipelines");
|
||||
for (const auto module : _modules) context.Function<PFN_vkDestroyShaderModule>("vkDestroyShaderModule")(context.device, module, nullptr);
|
||||
_modules.clear();
|
||||
timing.Mark("create");
|
||||
LogPipelineStatistics_nid_no_patch(context, pipeline);
|
||||
} catch (...) {
|
||||
|
||||
Reference in new issue
Block a user