mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-25 21:14:20 +01:00
Only include active RTs in pipeline state key
This was causing a buildup of many redundant pipelines in SMO as a depth-only shader was being called without previous RTs being unbound.
This commit is contained in:
parent
9d3a9f63d5
commit
6333a92b53
@ -35,6 +35,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
||||
|
||||
void ColorRenderTargetState::Flush(InterconnectContext &ctx, PackedPipelineState &packedState) {
|
||||
auto &target{engine->colorTarget};
|
||||
format = target.format;
|
||||
packedState.SetColorRenderTargetFormat(index, target.format);
|
||||
|
||||
if (target.format == engine::ColorTarget::Format::Disabled) {
|
||||
@ -78,6 +79,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
||||
|
||||
view = ctx.gpu.texture.FindOrCreate(guest, ctx.executor.tag);
|
||||
} else {
|
||||
format = engine::ColorTarget::Format::Disabled;
|
||||
packedState.SetColorRenderTargetFormat(index, engine::ColorTarget::Format::Disabled);
|
||||
view = {};
|
||||
}
|
||||
@ -391,9 +393,12 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
||||
}
|
||||
|
||||
colorAttachments.clear();
|
||||
packedState.colorRenderTargetFormats = {};
|
||||
for (size_t i{}; i < engine::ColorTargetCount; i++) {
|
||||
if (i < ctSelect.count) {
|
||||
const auto &view{colorRenderTargets[ctSelect[i]].UpdateGet(ctx, packedState).view.get()};
|
||||
const auto &rt{colorRenderTargets[ctSelect[i]].UpdateGet(ctx, packedState)};
|
||||
const auto view{rt.view.get()};
|
||||
packedState.SetColorRenderTargetFormat(ctSelect[i], rt.format);
|
||||
colorAttachments.push_back(view);
|
||||
|
||||
if (view)
|
||||
|
@ -28,6 +28,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
||||
ColorRenderTargetState(dirty::Handle dirtyHandle, DirtyManager &manager, const EngineRegisters &engine, size_t index);
|
||||
|
||||
std::shared_ptr<TextureView> view;
|
||||
engine::ColorTarget::Format format{engine::ColorTarget::Format::Disabled};
|
||||
|
||||
void Flush(InterconnectContext &ctx, PackedPipelineState &packedState);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user