mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-10 22:25:05 +01:00
Zero out vertex attribute state when disabled to avoid creating redundant pipelines
This commit is contained in:
parent
751e3356e1
commit
3766be59e7
@ -329,7 +329,6 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Vertex Input State */
|
/* Vertex Input State */
|
||||||
// TODO: check if better individually
|
|
||||||
void VertexInputState::EngineRegisters::DirtyBind(DirtyManager &manager, dirty::Handle handle) const {
|
void VertexInputState::EngineRegisters::DirtyBind(DirtyManager &manager, dirty::Handle handle) const {
|
||||||
ranges::for_each(vertexStreams, [&](const auto ®s) { manager.Bind(handle, regs.format, regs.frequency); });
|
ranges::for_each(vertexStreams, [&](const auto ®s) { manager.Bind(handle, regs.format, regs.frequency); });
|
||||||
|
|
||||||
@ -344,8 +343,12 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
|||||||
for (u32 i{}; i < engine::VertexStreamCount; i++)
|
for (u32 i{}; i < engine::VertexStreamCount; i++)
|
||||||
packedState.SetVertexBinding(i, engine->vertexStreams[i], engine->vertexStreamInstance[i]);
|
packedState.SetVertexBinding(i, engine->vertexStreams[i], engine->vertexStreamInstance[i]);
|
||||||
|
|
||||||
for (u32 i{}; i < engine::VertexAttributeCount; i++)
|
for (u32 i{}; i < engine::VertexAttributeCount; i++) {
|
||||||
|
if (engine->vertexAttributes[i].source == engine::VertexAttribute::Source::Active)
|
||||||
packedState.vertexAttributes[i] = engine->vertexAttributes[i];
|
packedState.vertexAttributes[i] = engine->vertexAttributes[i];
|
||||||
|
else
|
||||||
|
packedState.vertexAttributes[i] = { .source = engine::VertexAttribute::Source::Inactive };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Input Assembly State */
|
/* Input Assembly State */
|
||||||
|
Loading…
Reference in New Issue
Block a user