mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-21 14:23:02 +01:00
Vulkan synchronization fixes (#2386)
* Fix out of bounds index for unknown device types * Vulkan: Insert barrier before image host reads * Vulkan: Make commands wait for the wait semaphore Making commands wait at BOTTOM_OF_PIPE is a no-op, resulting in instant execution * Vulkan: Insert barrier between views/dispatches instead of waiting on the host * Vulkan: Fix determination of access flag from image layout This fixes two write-after-write races with copy commands after a layout transition to VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL * Add BGFX_MAX_FRAME_LATENCY define Affected backends either used a magic value of 3 or defined their own XX_MAX_FRAMES_IN_FLIGHT to be 3 * Vulkan: Include indirect draw in pipeline barrier * Vulkan: honor init.resolution.numBackBuffers for swapchain size * Make max frame latency configurable at compile time
This commit is contained in:
@@ -954,7 +954,7 @@ namespace bgfx { namespace d3d12
|
||||
m_scd.alphaMode = DXGI_ALPHA_MODE_IGNORE;
|
||||
m_scd.flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;
|
||||
|
||||
m_scd.maxFrameLatency = bx::min<uint8_t>(_init.resolution.maxFrameLatency, 3);
|
||||
m_scd.maxFrameLatency = bx::min<uint8_t>(_init.resolution.maxFrameLatency, BGFX_CONFIG_MAX_FRAME_LATENCY);
|
||||
m_scd.nwh = g_platformData.nwh;
|
||||
m_scd.ndt = g_platformData.ndt;
|
||||
m_scd.windowed = true;
|
||||
|
||||
Reference in New Issue
Block a user