mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 01:41:10 +00:00
[vulkan] Clean up packet submission
In the end, there's no need for the two paths and I want to be able to submit empty packets with semaphores.
This commit is contained in:
parent
a89aa7fc33
commit
a4c4155a51
1 changed files with 2 additions and 17 deletions
|
@ -275,25 +275,10 @@ QFV_PacketSubmit (qfv_packet_t *packet)
|
|||
qfv_device_t *device = stage->device;
|
||||
qfv_devfuncs_t *dfunc = device->funcs;
|
||||
|
||||
if (!packet->length) {
|
||||
// XXX at this stage, this looks the same as below, I think a queue
|
||||
// completing is the only way to set a fence (other than creation),
|
||||
// so submit the (hopefully) empty command buffer so the fence becomes
|
||||
// set, but without waiting on or triggering any semaphores.
|
||||
dfunc->vkEndCommandBuffer (packet->cmd);
|
||||
VkSubmitInfo submitInfo = {
|
||||
VK_STRUCTURE_TYPE_SUBMIT_INFO, 0,
|
||||
0, 0, 0,
|
||||
1, &packet->cmd,
|
||||
0, 0,
|
||||
};
|
||||
dfunc->vkQueueSubmit (device->queue.queue, 1, &submitInfo,
|
||||
packet->fence);
|
||||
return;
|
||||
if (packet->length) {
|
||||
QFV_FlushStagingBuffer (stage, packet->offset, packet->length);
|
||||
}
|
||||
|
||||
QFV_FlushStagingBuffer (stage, packet->offset, packet->length);
|
||||
|
||||
dfunc->vkEndCommandBuffer (packet->cmd);
|
||||
//XXX it may become necessary to pass in semaphores etc (maybe add to
|
||||
//packet?)
|
||||
|
|
Loading…
Reference in a new issue