-
Notifications
You must be signed in to change notification settings - Fork 133
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
API Issue for Renderer
#545
Milestone
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current API which can be seen in the examples suggests that there should be one
Renderer
perwgpu::Device
.This can be a problem when you have one gpu which supports and must handle multiple surface formats, which can happen when having multiple windows on multiple monitors of different formats (i think).
Because I don't have multiple monitors, I helped a bit in code with this patch on the
with_winit
example:force_different_surface_format.patch
I saw that my window expects
Rgba8Unorm
and forced it to useBgra8Unorm
.After running, the program crashes with the following error:
From conversation on zulip linked at the top, the idea of removing the manual
Vec<Option<Renderer>>
list and moving it into theRenderContext
to hide the selection of a renderer to the end user came up.It is open to debate whether we want multiple renderers over one device, which needs us to change the basic
Vec<Option<_>>
solution, or supplying the surface format on render command (Daniel thinks that the surface format is only needed for the blit pipeline), or something not mentioned here.Another interesting think is what happens when a window gets created with one surface_format and then gets moved to another monitor which is HDR (I am not sure what the OS does there and if we need to dynamically change the surface_format, what is when it is split up between two monitors? Would be great to know if there are any OS Resources documenting that).
The text was updated successfully, but these errors were encountered: