-
Notifications
You must be signed in to change notification settings - Fork 184
Conversation
…anic and avoid creating an unused padded buffer
In wgpu 0.7, this was a valid operation, the zero padding was done by hand. However in gfx-rs#872 this was removed as an optimization since buffers are zero padded, however the slice end was taken from buffer.slice which has to be aligned when mapped.
902: Release 0.8.1 r=kvark a=kvark Co-authored-by: Imbris <[email protected]> Co-authored-by: Pâris DOUADY <[email protected]> Co-authored-by: Dzmitry Malyshau <[email protected]>
Cargo.toml
Outdated
@@ -48,6 +49,7 @@ raw-window-handle = "0.3" | |||
smallvec = "1" | |||
tracing = { version = "0.1", default-features = false, features = ["std"] } | |||
serde = { version = "1", features = ["derive"], optional = true } | |||
openxr = { version = "0.14", features = ["loaded"], default-features = false, optional = true } |
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.
Is it okay to pull openxr as optional dependency?
@@ -22,6 +22,7 @@ replay = ["serde", "wgc/replay"] | |||
# Make Vulkan backend available on platforms where it is by default not, e.g. macOS | |||
vulkan-portability = ["wgc/gfx-backend-vulkan"] | |||
webgl = ["wgc"] | |||
use-openxr = ["wgc/use-openxr", "openxr"] |
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.
Should probably rename the feature use-openxr
(across crates)
@@ -1586,6 +1603,25 @@ impl Device { | |||
} | |||
} | |||
|
|||
/// Creates a new [`Texture`] from a raw (Vulkan) image | |||
#[cfg(feature = "use-openxr")] | |||
pub fn create_openxr_texture_from_raw_image( |
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.
Fantastic! OpenXR support for wgpu-rs is something I really would like to see. I do wonder if it could be implemented by instead exposing internal WebGPU, Vulkan, DX12, etc primitives in wgpu-rs through platform dependent traits, and then having an wgpu-openxr crate that uses those. |
For context, I've updated the architecture document. There's quite a bit of different things going on (i/o, swapchain, device handling, etc.) so its a bit of puzzle to find the right places in ecosystem for each. Openxr itself supports vulkan and opengl at least. |
Project moved to |
I've made a proof-of-concept for OpenXR rendering on Bevy engine, using wgpu & underlying stack. See https://github.com/blaind/xrbevy
The code in this pull request is not even close to merge-able, but I thought its good idea to open it for further discussion.
See also gfx-rs/gfx#3761 and gfx-rs/wgpu#1387
For architecture of the pull request, see https://github.com/blaind/xrbevy/blob/main/docs/architecture.md (evolving document)