mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-29 14:57:41 -05:00
vk_buffer_cache: Fix quad index array with 0 vertices (#6627)
This commit is contained in:
parent
6573ff64b4
commit
9a26d96c98
1 changed files with 7 additions and 0 deletions
|
@ -161,6 +161,13 @@ void BufferCacheRuntime::BindIndexBuffer(PrimitiveTopology topology, IndexFormat
|
||||||
}
|
}
|
||||||
|
|
||||||
void BufferCacheRuntime::BindQuadArrayIndexBuffer(u32 first, u32 count) {
|
void BufferCacheRuntime::BindQuadArrayIndexBuffer(u32 first, u32 count) {
|
||||||
|
if (count == 0) {
|
||||||
|
ReserveNullBuffer();
|
||||||
|
scheduler.Record([this](vk::CommandBuffer cmdbuf) {
|
||||||
|
cmdbuf.BindIndexBuffer(*null_buffer, 0, VK_INDEX_TYPE_UINT32);
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
ReserveQuadArrayLUT(first + count, true);
|
ReserveQuadArrayLUT(first + count, true);
|
||||||
|
|
||||||
// The LUT has the indices 0, 1, 2, and 3 copied as an array
|
// The LUT has the indices 0, 1, 2, and 3 copied as an array
|
||||||
|
|
Loading…
Reference in a new issue