diff --git a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_manager.h b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_manager.h index 025780cf..d4b602c6 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_manager.h +++ b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_manager.h @@ -88,7 +88,6 @@ namespace skyline::gpu::interconnect::maxwell3d { u32 lastExecutionNumber{}; //!< The last execution number this pipeline was used at std::array shaderStages; DescriptorInfo descriptorInfo; - cache::GraphicsPipelineCache::CompiledPipeline compiledPipeline; std::array transitionCache{}; size_t transitionCacheNextIdx{}; @@ -98,6 +97,8 @@ namespace skyline::gpu::interconnect::maxwell3d { void SyncCachedStorageBufferViews(u32 executionNumber); public: + cache::GraphicsPipelineCache::CompiledPipeline compiledPipeline; + PackedPipelineState sourcePackedState; Pipeline(InterconnectContext &ctx, const PackedPipelineState &packedState, const std::array &shaderBinaries, span colorAttachments, TextureView *depthAttachment); diff --git a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_state.cpp b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_state.cpp index b9b4c9e6..4f54f7ad 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_state.cpp +++ b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_state.cpp @@ -535,6 +535,10 @@ namespace skyline::gpu::interconnect::maxwell3d { pipeline = newPipeline; } + void PipelineState::PurgeCaches() { + pipeline = nullptr; + } + std::shared_ptr PipelineState::GetColorRenderTargetForClear(InterconnectContext &ctx, size_t index) { return colorRenderTargets[index].UpdateGet(ctx, packedState).view; } diff --git a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_state.h b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_state.h index 862692a3..21cbcce5 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_state.h +++ b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_state.h @@ -271,7 +271,7 @@ namespace skyline::gpu::interconnect::maxwell3d { /** * @brief Holds all GPU state for a pipeline, any changes to this will result in a pipeline cache lookup */ - class PipelineState : dirty::ManualDirty { + class PipelineState : dirty::CachedManualDirty { public: struct EngineRegisters { std::array pipelineStageRegisters; @@ -317,6 +317,8 @@ namespace skyline::gpu::interconnect::maxwell3d { void Flush(InterconnectContext &ctx, StateUpdateBuilder &builder); + void PurgeCaches(); + std::shared_ptr GetColorRenderTargetForClear(InterconnectContext &ctx, size_t index); std::shared_ptr GetDepthRenderTargetForClear(InterconnectContext &ctx);