[Merged by Bors] - Set naga capabilities corresponding to wgpu features#4824
Closed
MDeiml wants to merge 1 commit intobevyengine:mainfrom
Closed
[Merged by Bors] - Set naga capabilities corresponding to wgpu features#4824MDeiml wants to merge 1 commit intobevyengine:mainfrom
MDeiml wants to merge 1 commit intobevyengine:mainfrom
Conversation
Closed
mockersf
approved these changes
May 22, 2022
james7132
requested changes
May 22, 2022
james7132
requested changes
May 23, 2022
james7132
approved these changes
May 23, 2022
Member
james7132
left a comment
There was a problem hiding this comment.
Looks good to me now. Just one readability bit.
| ), | ||
| ]; | ||
| let mut capabilities = Capabilities::empty(); | ||
| for (f, c) in CAPABILITIES { |
Member
There was a problem hiding this comment.
Avoid using single letter variable names, generally harder to read.
Contributor
Author
There was a problem hiding this comment.
Oh sure, sry, one moment
Member
|
bors try |
Contributor
Member
|
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Jun 3, 2022
# Objective At the moment all extra capabilities are disabled when validating shaders with naga: https://github.com/bevyengine/bevy/blob/c7c08f95cb784afc366eb2dcedd21d9d40e72d32/crates/bevy_render/src/render_resource/shader.rs#L146-L149 This means these features can't be used even if the corresponding wgpu features are active. ## Solution With these changes capabilities are now set corresponding to `RenderDevice::features`. --- I have validated these changes for push constants with a project I am currently working on. Though bevy does not support creating pipelines with push constants yet, so I was only able to see that shaders are validated and compiled as expected.
Contributor
james7132
pushed a commit
to james7132/bevy
that referenced
this pull request
Jun 7, 2022
# Objective At the moment all extra capabilities are disabled when validating shaders with naga: https://github.com/bevyengine/bevy/blob/c7c08f95cb784afc366eb2dcedd21d9d40e72d32/crates/bevy_render/src/render_resource/shader.rs#L146-L149 This means these features can't be used even if the corresponding wgpu features are active. ## Solution With these changes capabilities are now set corresponding to `RenderDevice::features`. --- I have validated these changes for push constants with a project I am currently working on. Though bevy does not support creating pipelines with push constants yet, so I was only able to see that shaders are validated and compiled as expected.
james7132
pushed a commit
to james7132/bevy
that referenced
this pull request
Oct 28, 2022
# Objective At the moment all extra capabilities are disabled when validating shaders with naga: https://github.com/bevyengine/bevy/blob/c7c08f95cb784afc366eb2dcedd21d9d40e72d32/crates/bevy_render/src/render_resource/shader.rs#L146-L149 This means these features can't be used even if the corresponding wgpu features are active. ## Solution With these changes capabilities are now set corresponding to `RenderDevice::features`. --- I have validated these changes for push constants with a project I am currently working on. Though bevy does not support creating pipelines with push constants yet, so I was only able to see that shaders are validated and compiled as expected.
ItsDoot
pushed a commit
to ItsDoot/bevy
that referenced
this pull request
Feb 1, 2023
# Objective At the moment all extra capabilities are disabled when validating shaders with naga: https://github.com/bevyengine/bevy/blob/c7c08f95cb784afc366eb2dcedd21d9d40e72d32/crates/bevy_render/src/render_resource/shader.rs#L146-L149 This means these features can't be used even if the corresponding wgpu features are active. ## Solution With these changes capabilities are now set corresponding to `RenderDevice::features`. --- I have validated these changes for push constants with a project I am currently working on. Though bevy does not support creating pipelines with push constants yet, so I was only able to see that shaders are validated and compiled as expected.
This file contains hidden or 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
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.
Objective
At the moment all extra capabilities are disabled when validating shaders with naga:
bevy/crates/bevy_render/src/render_resource/shader.rs
Lines 146 to 149 in c7c08f9
This means these features can't be used even if the corresponding wgpu features are active.
Solution
With these changes capabilities are now set corresponding to
RenderDevice::features.I have validated these changes for push constants with a project I am currently working on. Though bevy does not support creating pipelines with push constants yet, so I was only able to see that shaders are validated and compiled as expected.