-
Notifications
You must be signed in to change notification settings - Fork 187
Conversation
} | ||
|
||
#[cfg(not(feature = "gl"))] | ||
pub fn create_surface_from_macos_layer(&self, layer: *mut std::ffi::c_void) -> Surface { |
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 this being removed? I depend on this since there is no other option to let SDL2 set everything up and just pass you the layer. raw-window-handle
doesn't feel fleshed out enough to rely on for now?
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.
indeed, we should keep that one
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 too late to give my feedback on the raw-window-handle
stuff or is this something decided? It seems very unfinished as an idea, and I do mean just the idea alone sans implementation. rust-windowing/raw-window-handle#14
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.
I think we can live with NSView/UIView, but the discussion about CAMetalLayer
does still need to happen. Thanks for filing the issue!
/// adapter. | ||
/// | ||
/// # Panics | ||
/// | ||
/// Panics if there are no available adapters. This will occur if none of the graphics backends | ||
/// are enabled. | ||
pub fn get_adapter(&self, options: Option<&RequestAdapterOptions>) -> Adapter { | ||
pub fn request_adapter(&self, options: &RequestAdapterOptions) -> Adapter { |
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.
How are you supposed to call request_adapter(None) now?
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.
it's equivalent to request_adapter(&wgpu::RequestAdapterOptions::default())
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.
Oh yeah fair enough.
I guess my only issue is one day when we are using wgpu-rs on the web, we wont be able to access that part of the API, if only for testing different browser implementations, but that seems pretty obscure.
(I would mark this as resolved if I could, I dont seem to have access)
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.
The Option
thing in WebIDL specification itself is defined to be equivalent of supplying a dictionary with the fields full of default values, so it's not like a browser has freedom to do anything other than this (it would be a bug!).
@@ -554,9 +542,9 @@ impl Adapter { | |||
/// # Panics | |||
/// | |||
/// Panics if the extensions specified by `desc` are not supported by this adapter. | |||
pub fn request_device(&self, desc: Option<&DeviceDescriptor>) -> Device { | |||
pub fn request_device(&self, desc: &DeviceDescriptor) -> Device { |
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.
How are you supposed to call request_device(None) now?
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.
similarly, by doing request_device(&wgpu::DeviceDescriptor::default())
Cargo.toml
Outdated
@@ -20,12 +20,13 @@ metal = ["wgn/gfx-backend-metal"] | |||
dx11 = ["wgn/gfx-backend-dx11"] | |||
dx12 = ["wgn/gfx-backend-dx12"] | |||
vulkan = ["wgn/gfx-backend-vulkan"] | |||
gl = ["wgn/gfx-backend-gl"] | |||
#gl = ["wgn/gfx-backend-gl"] | |||
|
|||
[dependencies] | |||
#TODO: only depend on the published version |
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 TODO is actually done now?
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.
indeed, will fix that, thanks!
/// | ||
/// A `BindGroupLayoutDescriptor` can be passed to [`Device::create_bind_group_layout`] to obtain a | ||
/// [`BindGroupLayout`]. | ||
pub struct BindGroupLayoutDescriptor<'a> { |
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.
I think one reason the descriptor was useful is because of the inheritance chain (GPUBindGroupLayoutDescriptor : GPUObjectDescriptorBase
). GPUObjectDescriptorBase
has DOMString? label
(which we haven't implemented yet), so by accepting a slice here we won't be able to provide debug labels for bind group layouts.
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.
aha, great point!
@@ -20,12 +20,13 @@ metal = ["wgn/gfx-backend-metal"] | |||
dx11 = ["wgn/gfx-backend-dx11"] | |||
dx12 = ["wgn/gfx-backend-dx12"] | |||
vulkan = ["wgn/gfx-backend-vulkan"] | |||
gl = ["wgn/gfx-backend-gl"] | |||
#gl = ["wgn/gfx-backend-gl"] |
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 there an issue for the part that gl is blocked on here? It would probably be useful to clarify it in a comment for anyone using gl patches at the moment
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.
issue is that we initialize all other backends without winit
feature
for GL, there is currently no way to use it without glutin
. Enabling glutin
though on the backend would conflict with glutin
in wgpu-rs itself, since the backends are from crates.io and they rely on the old glutin
version...
This will be unlocked if/when we back-port raw-window-handle to gfx-backend-gl-0.3
I think everything got reviewed and addressed... |
70: Wholesome update for wgpu-0.3 r=everyone a=kvark ~~This update is a little more opinionated, i.e. the BGL creation just accepts a slice of things instead of a descriptor. I believe the reason for descriptors in the upstream API is mostly techincal - it's more convenient to generate bindings in Googles giant codegen. Following it verbatim doesn't appear to be strictly necessary, especially if we can extract better usability from Rust features.~~ The change also disables "gl" feature for the release. We'll re-enable it once we can provide it nicely, it will not be a breaking change. I also noticed that barriers are not working correctly on the mipmap example. Will investigate separately - the native part is already published anyway. Edit: fixed by gfx-rs/wgpu#302 Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
Build succeeded |
This update is a little more opinionated, i.e. the BGL creation just accepts a slice of things instead of a descriptor. I believe the reason for descriptors in the upstream API is mostly techincal - it's more convenient to generate bindings in Googles giant codegen. Following it verbatim doesn't appear to be strictly necessary, especially if we can extract better usability from Rust features.The change also disables "gl" feature for the release. We'll re-enable it once we can provide it nicely, it will not be a breaking change.
I also noticed that barriers are not working correctly on the mipmap example. Will investigate separately - the native part is already published anyway. Edit: fixed by gfx-rs/wgpu#302