mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-05 14:45:07 +01:00
Expose color and depth attachments to Draw
This commit is contained in:
parent
aae957819e
commit
6a1615a104
@ -381,6 +381,15 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
||||
return pipeline.Get().pipeline;
|
||||
}
|
||||
|
||||
|
||||
span<TextureView *> ActiveState::GetColorAttachments() {
|
||||
return pipeline.Get().colorAttachments;
|
||||
}
|
||||
|
||||
TextureView *ActiveState::GetDepthAttachment() {
|
||||
return pipeline.Get().depthAttachment;
|
||||
}
|
||||
|
||||
std::shared_ptr<TextureView> ActiveState::GetColorRenderTargetForClear(InterconnectContext &ctx, size_t index) {
|
||||
return pipeline.Get().GetColorRenderTargetForClear(ctx, index);
|
||||
}
|
||||
|
@ -258,6 +258,10 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
||||
|
||||
Pipeline *GetPipeline();
|
||||
|
||||
span<TextureView *> GetColorAttachments();
|
||||
|
||||
TextureView *GetDepthAttachment();
|
||||
|
||||
std::shared_ptr<TextureView> GetColorRenderTargetForClear(InterconnectContext &ctx, size_t index);
|
||||
|
||||
std::shared_ptr<TextureView> GetDepthRenderTargetForClear(InterconnectContext &ctx);
|
||||
|
@ -493,12 +493,12 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
||||
shaderBinaries[i] = stage.binary;
|
||||
}
|
||||
|
||||
boost::container::static_vector<TextureView *, engine::ColorTargetCount> colorAttachments;
|
||||
colorAttachments.clear();
|
||||
for (auto &colorRenderTarget : colorRenderTargets)
|
||||
if (auto view{colorRenderTarget.UpdateGet(ctx, packedState).view})
|
||||
colorAttachments.push_back(view.get());
|
||||
|
||||
TextureView *depthAttachment{depthRenderTarget.UpdateGet(ctx, packedState).view.get()};
|
||||
depthAttachment = depthRenderTarget.UpdateGet(ctx, packedState).view.get();
|
||||
|
||||
vertexInput.Update(packedState);
|
||||
directState.inputAssembly.Update(packedState);
|
||||
|
@ -308,6 +308,8 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
||||
public:
|
||||
DirectPipelineState directState;
|
||||
Pipeline *pipeline{};
|
||||
boost::container::static_vector<TextureView *, engine::ColorTargetCount> colorAttachments;
|
||||
TextureView *depthAttachment{};
|
||||
|
||||
PipelineState(dirty::Handle dirtyHandle, DirtyManager &manager, const EngineRegisters &engine);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user