From ad0275dbefcb5023057d9aa961a1d5b48da26a6d Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Thu, 15 Sep 2022 22:26:00 +0100 Subject: [PATCH] Expose active pipeline for access by Maxwell3D class --- .../cpp/skyline/gpu/interconnect/maxwell_3d/active_state.cpp | 4 ++++ .../cpp/skyline/gpu/interconnect/maxwell_3d/active_state.h | 2 ++ .../cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_state.h | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/active_state.cpp b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/active_state.cpp index 4e729fa9..31c37c95 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/active_state.cpp +++ b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/active_state.cpp @@ -376,6 +376,10 @@ namespace skyline::gpu::interconnect::maxwell3d { updateFunc(stencilValues); } + Pipeline *ActiveState::GetPipeline() { + return pipeline.Get().pipeline; + } + std::shared_ptr ActiveState::GetColorRenderTargetForClear(InterconnectContext &ctx, size_t index) { return pipeline.Get().GetColorRenderTargetForClear(ctx, index); } diff --git a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/active_state.h b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/active_state.h index d818447d..500c10a0 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/active_state.h +++ b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/active_state.h @@ -256,6 +256,8 @@ namespace skyline::gpu::interconnect::maxwell3d { */ void Update(InterconnectContext &ctx, StateUpdateBuilder &builder, bool indexed, engine::DrawTopology topology, u32 drawElementCount); + Pipeline *GetPipeline(); + std::shared_ptr GetColorRenderTargetForClear(InterconnectContext &ctx, size_t index); std::shared_ptr GetDepthRenderTargetForClear(InterconnectContext &ctx); 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 86e2cb26..1c5c931d 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 @@ -290,7 +290,6 @@ namespace skyline::gpu::interconnect::maxwell3d { private: PipelineManager pipelineManager{}; - Pipeline *pipeline{}; PackedPipelineState packedState{}; @@ -308,6 +307,7 @@ namespace skyline::gpu::interconnect::maxwell3d { public: DirectPipelineState directState; + Pipeline *pipeline{}; PipelineState(dirty::Handle dirtyHandle, DirtyManager &manager, const EngineRegisters &engine);