mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 13:31:37 +00:00
Prevent buffer overrun
This commit is contained in:
parent
d98df0b498
commit
816daad673
1 changed files with 7 additions and 0 deletions
|
@ -249,6 +249,13 @@ void VkLightmap::Render()
|
|||
drawindexed.Constants[drawindexed.Pos] = pc;
|
||||
drawindexed.Commands[drawindexed.Pos] = cmd;
|
||||
drawindexed.Pos++;
|
||||
|
||||
if (drawindexed.Pos == drawindexed.BufferSize)
|
||||
{
|
||||
// Our indirect draw buffer is full. Postpone the rest.
|
||||
buffersFull = true;
|
||||
break;
|
||||
}
|
||||
#else
|
||||
cmdbuffer->pushConstants(raytrace.pipelineLayout.get(), VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT, 0, sizeof(LightmapRaytracePC), &pc);
|
||||
cmdbuffer->drawIndexed(surface->numElements, 1, surface->startElementIndex, 0, 0);
|
||||
|
|
Loading…
Reference in a new issue