-
Notifications
You must be signed in to change notification settings - Fork 977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enforce that InstanceFlags::GPU_BASED_VALIDATION
implies VALIDATION
on all back ends
#5232
Draft
ErichDonGubler
wants to merge
1
commit into
gfx-rs:trunk
Choose a base branch
from
erichdongubler-mozilla:gpu-based-validation-implies-validation
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Enforce that InstanceFlags::GPU_BASED_VALIDATION
implies VALIDATION
on all back ends
#5232
ErichDonGubler
wants to merge
1
commit into
gfx-rs:trunk
from
erichdongubler-mozilla:gpu-based-validation-implies-validation
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ErichDonGubler
force-pushed
the
gpu-based-validation-implies-validation
branch
2 times, most recently
from
February 9, 2024 19:44
427249d
to
a963b0b
Compare
ErichDonGubler
added a commit
to erichdongubler-mozilla/wgpu
that referenced
this pull request
Feb 9, 2024
If [`VK_LAYER_KHRONOS_validation`] is present, and it supports [`VK_EXT_validation_features`], we can configure it with another instance creation info. element of type [`VkValidationFeaturesEXT`] to enable GPU-based validation. Wire `InstanceFlags::GPU_BASED_VALIDATION` to do this in the Vulkan backend. It's even already finding issues in our `examples`! But…we'd like to handle those later. So, I've broken that out to [a separate issue][examples-fixups]. It is apparent from this and the [DX12 implementation of GPU-based validation] that we will need to communicate clearly to users that `InstanceFlags::GPU_BASED_VALIDATION` implies `InstanceFlags::VALIDATION`. Not all backends enforce this yet; I have [split out this work][follow-up for flag implication]. Note that `VK_EXT_validation_features` has been deprecated in favor of the more general layer configuration mechanism offered by [`VK_EXT_layer_settings`]. [DX12 implementation of GPU-based validation]: gfx-rs#5146 [`VK_EXT_layer_settings`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_layer_settings.html [`VK_EXT_validation_features`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_validation_features.html [`VK_LAYER_KHRONOS_validation`]:https://vulkan.lunarg.com/doc/sdk/1.3.275.0/linux/khronos_validation_layer.html [`VkValidationFeaturesEXT`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkValidationFeaturesEXT.html [examples-fixups]: gfx-rs#5231 [follow-up for flag implication]: gfx-rs#5232
ErichDonGubler
added a commit
to erichdongubler-mozilla/wgpu
that referenced
this pull request
Feb 10, 2024
WIP: feat(vulkan): enable GPU-based validation for Vulkan backend If [`VK_LAYER_KHRONOS_validation`] is present, and it supports [`VK_EXT_validation_features`], we can configure it with another instance creation info. element of type [`VkValidationFeaturesEXT`] to enable GPU-based validation. Wire `InstanceFlags::GPU_BASED_VALIDATION` to do this in the Vulkan backend. It's even already finding issues in our `examples` and other tests! But…we'd like to handle those later, since this is so important for users. So, I've broken that out to separate issues. The instances we're aware of: * `water` is running into sync. validation issues: see gfx-rs#5231 * `wgpu_test::shader::struct_layout::uniform_input` is failing to instrument shaders now; see TODO It is apparent from this and the [DX12 implementation of GPU-based validation] that we will need to communicate clearly to users that `InstanceFlags::GPU_BASED_VALIDATION` implies `InstanceFlags::VALIDATION`. Not all backends enforce this yet; I have [split out this work][follow-up for flag implication]. Note that `VK_EXT_validation_features` has been deprecated in favor of the more general layer configuration mechanism offered by [`VK_EXT_layer_settings`]. [DX12 implementation of GPU-based validation]: gfx-rs#5146 [`VK_EXT_layer_settings`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_layer_settings.html [`VK_EXT_validation_features`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_validation_features.html [`VK_LAYER_KHRONOS_validation`]:https://vulkan.lunarg.com/doc/sdk/1.3.275.0/linux/khronos_validation_layer.html [`VkValidationFeaturesEXT`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkValidationFeaturesEXT.html [follow-up for flag implication]: gfx-rs#5232
ErichDonGubler
force-pushed
the
gpu-based-validation-implies-validation
branch
from
February 10, 2024 04:05
a963b0b
to
29e4b2c
Compare
ErichDonGubler
added a commit
to erichdongubler-mozilla/wgpu
that referenced
this pull request
Feb 12, 2024
feat(vulkan): enable GPU-based validation for Vulkan backend If [`VK_LAYER_KHRONOS_validation`] is present, and it supports [`VK_EXT_validation_features`], we can configure it with another instance creation info. element of type [`VkValidationFeaturesEXT`] to enable GPU-based validation. Wire `InstanceFlags::GPU_BASED_VALIDATION` to do this in the Vulkan backend. It's even already finding issues in our `examples` and other tests! But…we'd like to handle those later, since this is so important for users. So, I've broken that out to separate issues. The instances we're aware of: * `water` is running into sync. validation issues: see <gfx-rs#5231> * `wgpu_test::shader::struct_layout::uniform_input` is failing to instrument shaders now; see <gfx-rs#5245> It is apparent from this and the [DX12 implementation of GPU-based validation] that we will need to communicate clearly to users that `InstanceFlags::GPU_BASED_VALIDATION` implies `InstanceFlags::VALIDATION`. Not all backends enforce this yet; I have [split out this work][follow-up for flag implication]. Note that `VK_EXT_validation_features` has been deprecated in favor of the more general layer configuration mechanism offered by [`VK_EXT_layer_settings`]. [DX12 implementation of GPU-based validation]: gfx-rs#5146 [`VK_EXT_layer_settings`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_layer_settings.html [`VK_EXT_validation_features`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_validation_features.html [`VK_LAYER_KHRONOS_validation`]:https://vulkan.lunarg.com/doc/sdk/1.3.275.0/linux/khronos_validation_layer.html [`VkValidationFeaturesEXT`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkValidationFeaturesEXT.html [follow-up for flag implication]: gfx-rs#5232
ErichDonGubler
added a commit
to erichdongubler-mozilla/wgpu
that referenced
this pull request
Feb 12, 2024
If [`VK_LAYER_KHRONOS_validation`] is present, and it supports [`VK_EXT_validation_features`], we can configure it with another instance creation info. element of type [`VkValidationFeaturesEXT`] to enable GPU-based validation. Wire `InstanceFlags::GPU_BASED_VALIDATION` to do this in the Vulkan backend. It's even already finding issues in our `examples` and other tests! But…we'd like to handle those later, since this is so important for users. So, I've broken that out to separate issues. The instances we're aware of: * `water` is running into sync. validation issues: see <gfx-rs#5231> * `wgpu_test::shader::struct_layout::uniform_input` is failing to instrument shaders now; see <gfx-rs#5245> It is apparent from this and the [DX12 implementation of GPU-based validation] that we will need to communicate clearly to users that `InstanceFlags::GPU_BASED_VALIDATION` implies `InstanceFlags::VALIDATION`. Not all backends enforce this yet; I have [split out this work][follow-up for flag implication]. Note that `VK_EXT_validation_features` has been deprecated in favor of the more general layer configuration mechanism offered by [`VK_EXT_layer_settings`]. [DX12 implementation of GPU-based validation]: gfx-rs#5146 [`VK_EXT_layer_settings`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_layer_settings.html [`VK_EXT_validation_features`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_validation_features.html [`VK_LAYER_KHRONOS_validation`]:https://vulkan.lunarg.com/doc/sdk/1.3.275.0/linux/khronos_validation_layer.html [`VkValidationFeaturesEXT`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkValidationFeaturesEXT.html [follow-up for flag implication]: gfx-rs#5232
ErichDonGubler
added a commit
that referenced
this pull request
Feb 12, 2024
If [`VK_LAYER_KHRONOS_validation`] is present, and it supports [`VK_EXT_validation_features`], we can configure it with another instance creation info. element of type [`VkValidationFeaturesEXT`] to enable GPU-based validation. Wire `InstanceFlags::GPU_BASED_VALIDATION` to do this in the Vulkan backend. It's even already finding issues in our `examples` and other tests! But…we'd like to handle those later, since this is so important for users. So, I've broken that out to separate issues. The instances we're aware of: * `water` is running into sync. validation issues: see <#5231> * `wgpu_test::shader::struct_layout::uniform_input` is failing to instrument shaders now; see <#5245> It is apparent from this and the [DX12 implementation of GPU-based validation] that we will need to communicate clearly to users that `InstanceFlags::GPU_BASED_VALIDATION` implies `InstanceFlags::VALIDATION`. Not all backends enforce this yet; I have [split out this work][follow-up for flag implication]. Note that `VK_EXT_validation_features` has been deprecated in favor of the more general layer configuration mechanism offered by [`VK_EXT_layer_settings`]. [DX12 implementation of GPU-based validation]: #5146 [`VK_EXT_layer_settings`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_layer_settings.html [`VK_EXT_validation_features`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_validation_features.html [`VK_LAYER_KHRONOS_validation`]:https://vulkan.lunarg.com/doc/sdk/1.3.275.0/linux/khronos_validation_layer.html [`VkValidationFeaturesEXT`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkValidationFeaturesEXT.html [follow-up for flag implication]: #5232
ErichDonGubler
force-pushed
the
gpu-based-validation-implies-validation
branch
2 times, most recently
from
February 21, 2024 19:39
f0c4b7b
to
054069a
Compare
ErichDonGubler
force-pushed
the
gpu-based-validation-implies-validation
branch
from
February 26, 2024 17:36
054069a
to
d958dd1
Compare
ErichDonGubler
force-pushed
the
gpu-based-validation-implies-validation
branch
from
March 7, 2024 03:47
d958dd1
to
32e65fd
Compare
ErichDonGubler
force-pushed
the
gpu-based-validation-implies-validation
branch
2 times, most recently
from
April 2, 2024 01:05
c6872e0
to
d93726b
Compare
ErichDonGubler
force-pushed
the
gpu-based-validation-implies-validation
branch
from
April 18, 2024 14:31
d93726b
to
52dbd40
Compare
ErichDonGubler
force-pushed
the
gpu-based-validation-implies-validation
branch
from
May 8, 2024 21:52
52dbd40
to
dddc864
Compare
Enforce in all back ends that `InstanceFlags::GPU_BASED_VALIDATION` implies `InstanceFlags::GPU_BASED_VALIDATION`. ATOW, the GLES is the only remaining implemented offender. TODO: I want at least the "basic" fix before jumping to a new convenience API. TODO: I think the check we add for whether validation is enabled is correct, but not current upstream?
ErichDonGubler
force-pushed
the
gpu-based-validation-implies-validation
branch
from
May 30, 2024 21:02
dddc864
to
d1ea91e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Connections
Link to the issues addressed by this PR, or dependent PRs in other repositories
Description
Describe what problem this is solving, and how it's solved.
Enforce in all back ends that
InstanceFlags::GPU_BASED_VALIDATION
impliesInstanceFlags::GPU_BASED_VALIDATION
. ATOW, the GLES is the only remaining implemented offender.Testing
Explain how this change is tested.
No tests have been added for this.
Checklist
cargo fmt
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.