Skip to content

Commit adc600d

Browse files
Matthew Russobwasty
authored andcommitted
adds mac only CPU/GPU explicit sync, updates mac env script for latest vulkan version
1 parent 6e4064c commit adc600d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

mac-env.sh

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
export VULKAN_SDK=$HOME/vulkansdk-macos-1.1.92.1/macOS
2+
export VULKAN_SDK=$HOME/vulkansdk-macos-1.1.97.0/macOS
33
export PATH=$VULKAN_SDK/bin:$PATH
44
export DYLD_LIBRARY_PATH=$VULKAN_SDK/lib:$DYLD_LIBRARY_PATH
55
export VK_ICD_FILENAMES=$VULKAN_SDK/etc/vulkan/icd.d/MoltenVK_icd.json

src/bin/22_descriptor_pools_and_sets.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -720,10 +720,10 @@ impl HelloTriangleApplication {
720720

721721
match future {
722722
Ok(future) => {
723-
// This makes sure the CPU stays in sync with the GPU
724-
// Not sure if this means we don't need to store the previous_frame_end since we're
725-
// explicitly waiting for it?
726-
future.wait(None);
723+
// This makes sure the CPU stays in sync with the GPU in situations when the CPU is
724+
// running "too fast"
725+
#[cfg(target_os = "macos")]
726+
future.wait(None).unwrap();
727727

728728
self.previous_frame_end = Some(Box::new(future) as Box<_>);
729729
}

0 commit comments

Comments
 (0)