mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-10 21:25:07 +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 */
|
||||
// TODO: check if better individually
|
||||
void VertexInputState::EngineRegisters::DirtyBind(DirtyManager &manager, dirty::Handle handle) const {
|
||||
ranges::for_each(vertexStreams, [&](const auto ®s) { manager.Bind(handle, regs.format, regs.frequency); });
|
||||
|
||||
@ -344,10 +343,14 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
||||
for (u32 i{}; i < engine::VertexStreamCount; i++)
|
||||
packedState.SetVertexBinding(i, engine->vertexStreams[i], engine->vertexStreamInstance[i]);
|
||||
|
||||
for (u32 i{}; i < engine::VertexAttributeCount; i++)
|
||||
packedState.vertexAttributes[i] = engine->vertexAttributes[i];
|
||||
for (u32 i{}; i < engine::VertexAttributeCount; i++) {
|
||||
if (engine->vertexAttributes[i].source == engine::VertexAttribute::Source::Active)
|
||||
packedState.vertexAttributes[i] = engine->vertexAttributes[i];
|
||||
else
|
||||
packedState.vertexAttributes[i] = { .source = engine::VertexAttribute::Source::Inactive };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Input Assembly State */
|
||||
void InputAssemblyState::EngineRegisters::DirtyBind(DirtyManager &manager, dirty::Handle handle) const {
|
||||
manager.Bind(handle, primitiveRestartEnable);
|
||||
|
Loading…
Reference in New Issue
Block a user