Skip to content

Rework synchronization in api based samples#1527

Draft
SaschaWillems wants to merge 12 commits intoKhronosGroup:mainfrom
SaschaWillems:sync_rework
Draft

Rework synchronization in api based samples#1527
SaschaWillems wants to merge 12 commits intoKhronosGroup:mainfrom
SaschaWillems:sync_rework

Conversation

@SaschaWillems
Copy link
Copy Markdown
Collaborator

@SaschaWillems SaschaWillems commented Apr 24, 2026

Description

This PR reworks how CPU/GPU sync works in the samples based on my (low-level) framework. Those sample still to a device wait idle after each frame, killing any chance of GPU/GPU parallelism.

This PR aims to fix that by introducing proper support for multiple frames-in-flight. The changes will mirror what I did for my samples last year: https://www.saschawillems.de/blog/2025/08/15/fundamental-vulkan-samples-rework/

Note: This is a draft, the PR currently mostly exists for me to track progress on this.

Fixes #1380

Sample Updated
1 buffer_device_address
2 calibrated_timestamps
3 color_write_enable
4 compute_nbody
5 conditional_rendering
6 conservative_rasterization
7 debug_utils
8 descriptor_buffer_basic
9 descriptor_indexing
10 dynamic_blending
11 dynamic_line_rasterization
12 dynamic_multisample_rasterization
13 dynamic_primitive_clipping
14 dynamic_rendering
15 dynamic_rendering_local_read
16 dynamic_uniform_buffers
17 extended_dynamic_state2
18 fragment_density_map
19 fragment_shader_barycentric
20 fragment_shading_rate
21 fragment_shading_rate_dynamic
22 graphics_pipeline_library
23 gshader_to_mshader
24 hdr
25 host_image_copy
26 hpp_compute_nbody
27 hpp_dynamic_uniform_buffers
28 hpp_hdr
29 hpp_instancing
30 hpp_mesh_shading
31 hpp_oit_depth_peeling
32 hpp_oit_linked_lists
33 hpp_push_descriptors
34 hpp_separate_image_sampler
35 hpp_terrain_tessellation
36 hpp_texture_loading
37 hpp_texture_mipmap_generation
38 hpp_timestamp_queries
39 instancing
40 logic_op_dynamic_state
41 memory_budget
42 mesh_shader_culling
43 mesh_shading
44 mobile_nerf
45 mobile_nerf_rayquery
46 multi_draw_indirect
47 oit_depth_peeling
48 oit_linked_lists
49 open_cl_interop
50 open_cl_interop_arm
51 open_gl_interop
52 patch_control_points
53 portability
54 profiles
55 push_descriptors
56 rasterization_order_attachment_access
57 ray_queries
58 ray_tracing_basic
59 ray_tracing_extended
60 ray_tracing_invocation_reorder
61 ray_tracing_position_fetch
62 ray_tracing_reflection
63 separate_image_sampler
64 shader_debugprintf
65 shader_object
66 sparse_image
67 synchronization_2
68 terrain_tessellation
69 texture_compression_basisu
70 texture_compression_comparison
71 texture_loading
72 texture_mipmap_generation
73 timeline_semaphore
74 timestamp_queries
75 vertex_dynamic_state

General Checklist:

Please ensure the following points are checked:

  • My code follows the coding style
  • I have reviewed file licenses
  • I have commented any added functions (in line with Doxygen)
  • I have commented any code that could be hard to understand
  • My changes do not add any new compiler warnings
  • My changes do not add any new validation layer errors or warnings
  • I have used existing framework/helper functions where possible
  • My changes do not add any regressions
  • I have tested every sample to ensure everything runs correctly
  • This PR describes the scope and expected impact of the changes I am making

Note: The Samples CI runs a number of checks including:

  • I have updated the header Copyright to reflect the current year (CI build will fail if Copyright is out of date)
  • My changes build on Windows, Linux, macOS and Android. Otherwise I have documented any exceptions

If this PR contains framework changes:

  • I did a full batch run using the batch command line argument to make sure all samples still work properly

Sample Checklist

If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist:

  • I have tested the sample on at least one compliant Vulkan implementation
  • If the sample is vendor-specific, I have tagged it appropriately
  • I have stated on what implementation the sample has been tested so that others can test on different implementations and platforms
  • Any dependent assets have been merged and published in downstream modules
  • For new samples, I have added a paragraph with a summary to the appropriate chapter in the readme of the folder that the sample belongs to e.g. api samples readme
  • For new samples, I have added a tutorial README.md file to guide users through what they need to know to implement code using this feature. For example, see conditional_rendering
  • For new samples, I have added a link to the Antora navigation so that the sample will be listed at the Vulkan documentation site

Locked behind a setting until all samples have been updated
Locked behind a setting until all samples have been updated
Locked behind a setting until all samples have been updated
Locked behind a setting until all samples have been updated
@SaschaWillems SaschaWillems added the framework This is relevant to the framework label Apr 24, 2026
@SaschaWillems SaschaWillems changed the title Sync rework Rework synchronization in api based samples Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework This is relevant to the framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rework synchronization in port of my framework

1 participant