-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Merged by Bors] - Set naga capabilities corresponding to wgpu features #4824
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now. Just one readability bit.
), | ||
]; | ||
let mut capabilities = Capabilities::empty(); | ||
for (f, c) in CAPABILITIES { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using single letter variable names, generally harder to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sure, sry, one moment
bors try |
bors r+ |
# 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.
# 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.
# 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.
# 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.
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.