mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-22 15:31:03 +01:00
Only wait for the Vulkan acquire fence for FIFO on Windows (#10714)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
This commit is contained in:
1 parent
b031e60a4d
commit
46176d45b1
2 files changed
+9
-3
No files matched your search
@@ -292,6 +292,7 @@ By @sagudev in [#10307](https://github.com/gfx-rs/wgpu/pull/10307).
|
||||
|
||||
#### Vulkan
|
||||
|
||||
- On Windows, only wait for the swapchain acquire fence in `Fifo` and `FifoRelaxed` present modes. It added acquire latency in `Immediate` and `Mailbox`. By @HashimTheArab in [#10714](https://github.com/gfx-rs/wgpu/pull/10714).
|
||||
- Fix `HalCounters::textures` drifting negative: `create_texture` never incremented it while `destroy_texture` always decremented it. By @dustyleary in [#10022](https://github.com/gfx-rs/wgpu/pull/10022).
|
||||
- Fix `VUID-VkImageViewCreateInfo-image-04441` validation errors when creating a view of a texture whose only usages are `COPY_SRC` and/or `COPY_DST`. By @MannXo in [#10200](https://github.com/gfx-rs/wgpu/issues/10200).
|
||||
- Add OpenHarmony surface support via `VK_OHOS_surface`. Previously the Vulkan backend could not create a surface on OpenHarmony, leaving GLES as the only usable backend. By @ozongzi in [#9908](https://github.com/gfx-rs/wgpu/pull/9908).
|
||||
|
||||
@@ -278,11 +278,16 @@ impl Surface for NativeSurface {
|
||||
let images = unsafe { functor.get_swapchain_images(raw) }
|
||||
.map_err(crate::vulkan::map_host_device_oom_err)?;
|
||||
|
||||
// This fence is only used to throttle acquisition on Windows. It is very important to
|
||||
// This fence is only used to throttle FIFO acquisition on Windows. It is very important to
|
||||
// avoid bad frame pacing when the Vulkan driver is using a DXGI swapchain. See
|
||||
// https://github.com/gfx-rs/wgpu/issues/8310 and
|
||||
// https://github.com/gfx-rs/wgpu/issues/8354 for more details.
|
||||
let fence = if cfg!(target_os = "windows") {
|
||||
// https://github.com/gfx-rs/wgpu/issues/8354 for more details. In other present modes it
|
||||
// only adds acquire latency, see https://github.com/gfx-rs/wgpu/issues/9559.
|
||||
let fence = if cfg!(target_os = "windows")
|
||||
&& matches!(
|
||||
config.present_mode,
|
||||
wgt::PresentMode::Fifo | wgt::PresentMode::FifoRelaxed
|
||||
) {
|
||||
let raw = unsafe {
|
||||
device
|
||||
.shared
|
||||
|
||||
Reference in new issue
Block a user