Skip to content

Commit

Permalink
feat(vulkan): enable GPU-based validation for Vulkan backend
Browse files Browse the repository at this point in the history
Logic for doing this was sourced from page 3 of [LunarG's guide], with
the following section stack:

* Activating GPU-Assisted Validation
    * Enabling and Specifying Options with the Programmatic Interface

[LunarG's guide]: https://www.lunarg.com/wp-content/uploads/2019/02/GPU-Assisted-Validation_v3_02_22_19.pdf
  • Loading branch information
ErichDonGubler committed Jan 26, 2024
1 parent 3acff41 commit 8b0f1bc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions wgpu-hal/src/vulkan/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,11 @@ impl crate::Instance<super::Api> for super::Instance {
create_info = create_info.push_next(vk_create_info);
}

let mut gpu_assisted_validation = vk::ValidationFeaturesEXT::builder()
.enabled_validation_features(gpu_assisted_validation)
.build();
create_info = create_info.push_next(&mut gpu_assisted_validation);

unsafe {
profiling::scope!("vkCreateInstance");
entry.create_instance(&create_info, None)
Expand Down

0 comments on commit 8b0f1bc

Please sign in to comment.