-
Notifications
You must be signed in to change notification settings - Fork 969
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 raw vulkan types #1415
Conversation
@@ -582,6 +582,9 @@ impl<'a, B: GfxBackend> RenderPassInfo<'a, B> { | |||
TextureViewInner::SwapChain { .. } => { | |||
return Err(RenderPassErrorInner::SwapChainImageAsDepthStencil); | |||
} | |||
TextureViewInner::Raw { .. } => { | |||
return Err(RenderPassErrorInner::SwapChainImageAsDepthStencil); |
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.
wrong error
@@ -496,7 +496,7 @@ fn check_device_features( | |||
} | |||
|
|||
struct RenderAttachment<'a> { | |||
texture_id: &'a Stored<id::TextureId>, | |||
texture_id: Option<&'a Stored<id::TextureId>>, |
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.
why is it optional now?
@@ -2626,6 +2632,66 @@ impl<B: GfxBackend> Device<B> { | |||
} | |||
} | |||
|
|||
impl Device<crate::backend::Vulkan> { | |||
unsafe fn create_raw_vulkan_texture_view( |
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.
This is quite tricky. How do you feel about the approach in gfx-rs/gfx#3761 as an alternative?
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.
Recap from discussion we've had on this on Matrix:
The plan right now is to introduce external textures to gfx-rs and use that instead of the raw vulkan views, and see if that's possible with OpenXR.
Heads up - we have major re-organization happening, so it would be better to land this after https://github.com/gfx-rs/wgpu/milestone/9 |
Sounds good, I'll likely re-write this using some more context when that's all landed. |
This seems to have been superseded by #1609 so I'll close this |
Connections
This PR depends on: gfx-rs/gfx#3767
This PR is necessary for: #602
Description
This adds support for using raw Vulkan instances, devices, and images with WGPU. This allows applications to use OpenXR with WGPU.
Testing
Bindings and example in WGPU-RS PR: gfx-rs/wgpu-rs#919
To-Do