mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-04 23:55:08 +01:00
Fix Incorrect Vertex Binding Divisor State Submission
We always submit pipeline divisor descriptions regardless of binding input rate being vertex rather than instance. This is invalid behavior and has been fixed by only submitting binding descriptors when the input rate is per-instance.
This commit is contained in:
parent
9f7e80cf8f
commit
727f83e969
@ -2358,7 +2358,8 @@ namespace skyline::gpu::interconnect {
|
||||
if (vertexBufferView) {
|
||||
auto &vertexBuffer{vertexBuffers[index]};
|
||||
vertexBindingDescriptions.push_back(vertexBuffer.bindingDescription);
|
||||
vertexBindingDivisorsDescriptions.push_back(vertexBuffer.bindingDivisorDescription);
|
||||
if (vertexBuffer.bindingDescription.inputRate == vk::VertexInputRate::eInstance)
|
||||
vertexBindingDivisorsDescriptions.push_back(vertexBuffer.bindingDivisorDescription);
|
||||
|
||||
std::scoped_lock vertexBufferLock(*vertexBufferView);
|
||||
vertexBufferHandles[index] = vertexBufferView->buffer->GetBacking();
|
||||
@ -2417,7 +2418,7 @@ namespace skyline::gpu::interconnect {
|
||||
}
|
||||
};
|
||||
|
||||
if (!supportsVertexAttributeDivisor)
|
||||
if (!supportsVertexAttributeDivisor || vertexBindingDivisorsDescriptions.empty())
|
||||
vertexState.unlink<vk::PipelineVertexInputDivisorStateCreateInfoEXT>();
|
||||
|
||||
vk::PipelineViewportStateCreateInfo viewportState{
|
||||
|
Loading…
Reference in New Issue
Block a user