mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-26 02:44:17 +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) {
|
void ColorRenderTargetState::Flush(InterconnectContext &ctx, PackedPipelineState &packedState) {
|
||||||
auto &target{engine->colorTarget};
|
auto &target{engine->colorTarget};
|
||||||
|
format = target.format;
|
||||||
packedState.SetColorRenderTargetFormat(index, target.format);
|
packedState.SetColorRenderTargetFormat(index, target.format);
|
||||||
|
|
||||||
if (target.format == engine::ColorTarget::Format::Disabled) {
|
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);
|
view = ctx.gpu.texture.FindOrCreate(guest, ctx.executor.tag);
|
||||||
} else {
|
} else {
|
||||||
|
format = engine::ColorTarget::Format::Disabled;
|
||||||
packedState.SetColorRenderTargetFormat(index, engine::ColorTarget::Format::Disabled);
|
packedState.SetColorRenderTargetFormat(index, engine::ColorTarget::Format::Disabled);
|
||||||
view = {};
|
view = {};
|
||||||
}
|
}
|
||||||
@ -391,9 +393,12 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
|||||||
}
|
}
|
||||||
|
|
||||||
colorAttachments.clear();
|
colorAttachments.clear();
|
||||||
|
packedState.colorRenderTargetFormats = {};
|
||||||
for (size_t i{}; i < engine::ColorTargetCount; i++) {
|
for (size_t i{}; i < engine::ColorTargetCount; i++) {
|
||||||
if (i < ctSelect.count) {
|
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);
|
colorAttachments.push_back(view);
|
||||||
|
|
||||||
if (view)
|
if (view)
|
||||||
|
@ -28,6 +28,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
|||||||
ColorRenderTargetState(dirty::Handle dirtyHandle, DirtyManager &manager, const EngineRegisters &engine, size_t index);
|
ColorRenderTargetState(dirty::Handle dirtyHandle, DirtyManager &manager, const EngineRegisters &engine, size_t index);
|
||||||
|
|
||||||
std::shared_ptr<TextureView> view;
|
std::shared_ptr<TextureView> view;
|
||||||
|
engine::ColorTarget::Format format{engine::ColorTarget::Format::Disabled};
|
||||||
|
|
||||||
void Flush(InterconnectContext &ctx, PackedPipelineState &packedState);
|
void Flush(InterconnectContext &ctx, PackedPipelineState &packedState);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user