mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-07 01:42:04 +00:00
[vulkan] Increase ring buffer size to 32 packets
I'm still not happy with it being a compile time constant, but this takes care of the interlock between frames in flight... for now: it's fragile and really needs the excessive small-packet use in draw and lighting to be cleaned up. After discussion with Darian, I've decided to go with one big staging buffer (with lots of packets) shared between FiF as the large size will, in the end, be more flexible.
This commit is contained in:
parent
e65e80f573
commit
63e66e81c5
2 changed files with 3 additions and 1 deletions
|
@ -17,7 +17,7 @@ typedef struct qfv_stagebuf_s {
|
|||
VkCommandPool cmdPool;
|
||||
VkBuffer buffer;
|
||||
VkDeviceMemory memory;
|
||||
RING_BUFFER(qfv_packet_t, 4) packets; ///< packets for controlling access
|
||||
RING_BUFFER(qfv_packet_t, 32) packets; ///< packets for controlling access
|
||||
size_t atom_mask; ///< for flush size rounding
|
||||
size_t size; ///< actual size of the buffer
|
||||
size_t end; ///< effective end of the buffer due to early wrap
|
||||
|
|
|
@ -273,6 +273,7 @@ QFV_PacketAcquire (qfv_stagebuf_t *stage)
|
|||
void *
|
||||
QFV_PacketExtend (qfv_packet_t *packet, size_t size)
|
||||
{
|
||||
qfZoneNamed (zone, true);
|
||||
void *data = acquire_space (packet, size);
|
||||
if (data) {
|
||||
packet->length += size;
|
||||
|
@ -283,6 +284,7 @@ QFV_PacketExtend (qfv_packet_t *packet, size_t size)
|
|||
void
|
||||
QFV_PacketSubmit (qfv_packet_t *packet)
|
||||
{
|
||||
qfZoneNamed (zone, true);
|
||||
qfv_stagebuf_t *stage = packet->stage;
|
||||
qfv_device_t *device = stage->device;
|
||||
qfv_devfuncs_t *dfunc = device->funcs;
|
||||
|
|
Loading…
Reference in a new issue