Implement Maxwell3D Vertex Buffer Instance Rate

Implements the `isVertexInputRatePerInstance` register array which controls if the vertex input rate is either per-vertex or per-instance. This works in conjunction with the vertex attribute divisor for per-instance attribute repetition of attributes.
This commit is contained in:
PixelyIon
2021-11-16 15:28:05 +05:30
parent 476c070c7a
commit 612f324e78
3 changed files with 21 additions and 12 deletions

View File

@ -784,6 +784,10 @@ namespace skyline::gpu::interconnect {
vertexBindings[index].stride = stride;
}
void SetVertexBufferInputRate(u32 index, bool isPerInstance) {
vertexBindings[index].inputRate = isPerInstance ? vk::VertexInputRate::eInstance : vk::VertexInputRate::eVertex;
}
void SetVertexBufferIovaHigh(u32 index, u32 high) {
vertexBindingIovas[index].high = high;
}