-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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] - bevy_render: Use RenderDevice to get limits/features and expose AdapterInfo #3931
Conversation
Ah...should have read more carefully, i think the two PRs have a different objective. |
Also renamed |
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.
LGTM, but could you add module level docs, like mentioned by @alice-i-cecile #3832 (comment) ? To make people aware that AdapterInfo
is available as a resource?
Done, with links. |
bors r+ |
…erInfo (#3931) # Objective - `WgpuOptions` is mutated to be updated with the actual device limits and features, but this information is readily available to both the main and render worlds through the `RenderDevice` which has .limits() and .features() methods - Information about the adapter in terms of its name, the backend in use, etc were not being exposed but have clear use cases for being used to take decisions about what rendering code to use. For example, if something works well on AMD GPUs but poorly on Intel GPUs. Or perhaps something works well in Vulkan but poorly in DX12. ## Solution - Stop mutating `WgpuOptions `and don't insert the updated values into the main and render worlds - Return `AdapterInfo` from `initialize_renderer` and insert it into the main and render worlds - Use `RenderDevice` limits in the lighting code that was using `WgpuOptions.limits`. - Renamed `WgpuOptions` to `WgpuSettings`
Objective
WgpuOptions
is mutated to be updated with the actual device limits and features, but this information is readily available to both the main and render worlds through theRenderDevice
which has .limits() and .features() methodsSolution
WgpuOptions
and don't insert the updated values into the main and render worldsAdapterInfo
frominitialize_renderer
and insert it into the main and render worldsRenderDevice
limits in the lighting code that was usingWgpuOptions.limits
.WgpuOptions
toWgpuSettings