Skip to content
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

Add support for Multiview (Multi Viewport) #3303

Open
Limeth opened this issue Jul 14, 2020 · 3 comments · May be fixed by #3323
Open

Add support for Multiview (Multi Viewport) #3303

Limeth opened this issue Jul 14, 2020 · 3 comments · May be fixed by #3323

Comments

@Limeth
Copy link

Limeth commented Jul 14, 2020

From the Vulkan spec:

VK_KHR_multiview

This extension has the same goal as the OpenGL ES GL_OVR_multiview extension - it enables rendering to multiple “views” by recording a single set of commands to be executed with slightly different behavior for each view. It includes a concise way to declare a render pass with multiple views, and gives implementations freedom to render the views in the most efficient way possible.


I am not familiar with how/if other backend APIs provide the same functionality.

@kvark
Copy link
Member

kvark commented Jul 14, 2020

Thank you for filing this! Doing an actual investigation into the backend support would be the next step.

@Limeth
Copy link
Author

Limeth commented Jul 14, 2020

Multi-View Rendering is supposedly supported by DX12, DX11, Vulkan and OpenGL, as written on the related NVidia page. They also have a nice article about the feature.

Resources on the feature:

@kvark
Copy link
Member

kvark commented Jul 15, 2020

Thank you! The next would be adding a feature to gfx-hal Features, something like:

const MULTIVIEW = 0x2000_0000_0000_0000;

If you are interested in the full thing, may also add these:

const MULTIVIEW_GEOMETRY_SHADER = 0x4000_0000_0000_0000;
const MULTIVIEW_TESSELLATION_SHADER = 0x8000_0000_0000_0000;

This is sorta optional as WebGPU isn't going to be using those anyway. It's up to you to limit the scope here, we can always follow-up and add those too.

Then basically extend the Rust API in the way it's done by VK_KHR_multiview extension:

  • adding the limits
  • add view_mask: u32 field to SubpassDesc
  • add view_offset: u32 field to SubpassDependency
  • find some way to provide the correlation masks, maybe just as an argument to create_render_pass

Finally, implement the logic on all backends, or at least update them to compile (not exposing the feature yet).

@Limeth Limeth linked a pull request Aug 2, 2020 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants