vk_buffer_cache: Respect max vertex bindings in BindVertexBuffers (#11471)
This commit is contained in:
parent
bbfd9eb428
commit
24ab10c2f6
|
@ -529,17 +529,20 @@ void BufferCacheRuntime::BindVertexBuffers(VideoCommon::HostBindings<Buffer>& bi
|
||||||
buffer_handles.push_back(handle);
|
buffer_handles.push_back(handle);
|
||||||
}
|
}
|
||||||
if (device.IsExtExtendedDynamicStateSupported()) {
|
if (device.IsExtExtendedDynamicStateSupported()) {
|
||||||
scheduler.Record([bindings_ = std::move(bindings),
|
scheduler.Record([this, bindings_ = std::move(bindings),
|
||||||
buffer_handles_ = std::move(buffer_handles)](vk::CommandBuffer cmdbuf) {
|
buffer_handles_ = std::move(buffer_handles)](vk::CommandBuffer cmdbuf) {
|
||||||
cmdbuf.BindVertexBuffers2EXT(bindings_.min_index,
|
cmdbuf.BindVertexBuffers2EXT(bindings_.min_index,
|
||||||
bindings_.max_index - bindings_.min_index,
|
std::min(bindings_.max_index - bindings_.min_index,
|
||||||
|
device.GetMaxVertexInputBindings()),
|
||||||
buffer_handles_.data(), bindings_.offsets.data(),
|
buffer_handles_.data(), bindings_.offsets.data(),
|
||||||
bindings_.sizes.data(), bindings_.strides.data());
|
bindings_.sizes.data(), bindings_.strides.data());
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
scheduler.Record([bindings_ = std::move(bindings),
|
scheduler.Record([this, bindings_ = std::move(bindings),
|
||||||
buffer_handles_ = std::move(buffer_handles)](vk::CommandBuffer cmdbuf) {
|
buffer_handles_ = std::move(buffer_handles)](vk::CommandBuffer cmdbuf) {
|
||||||
cmdbuf.BindVertexBuffers(bindings_.min_index, bindings_.max_index - bindings_.min_index,
|
cmdbuf.BindVertexBuffers(bindings_.min_index,
|
||||||
|
std::min(bindings_.max_index - bindings_.min_index,
|
||||||
|
device.GetMaxVertexInputBindings()),
|
||||||
buffer_handles_.data(), bindings_.offsets.data());
|
buffer_handles_.data(), bindings_.offsets.data());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue