From the Vulkan spec:
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.
Thank you for filing this! Doing an actual investigation into the backend support would be the next step.
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:
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:
view_mask: u32 field to SubpassDescview_offset: u32 field to SubpassDependencycreate_render_passFinally, implement the logic on all backends, or at least update them to compile (not exposing the feature yet).