-
Notifications
You must be signed in to change notification settings - Fork 1k
Update API according to the upstream spec #285
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
Conversation
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.
Some other notes skimming through the recent spec history:
copyImageBitmapToTexture
should be added (https://gpuweb.github.io/gpuweb/#dom-gpucommandencoder-copyimagebitmaptotexture)LoadOp
has changed (https://gpuweb.github.io/gpuweb/#dom-gpurenderpasscolorattachmentdescriptor-loadvalue)PipelineStageDescriptor
has been renamed toProgrammableStageDescriptor
(https://gpuweb.github.io/gpuweb/#dictdef-gpuprogrammablestagedescriptor)copyBufferToBuffer
argument names changed, i.e.src
->source
(https://gpuweb.github.io/gpuweb/#dom-gpucommandencoder-copybuffertobuffer)RasterizationStateDescriptor
should be optional (maybe already covered by a default somewhere?)BufferBinding
'ssize
should be optional (maybe already covered by a default somewhere?)- We're missing an optional
CommandBufferDescriptor
infinish
(https://gpuweb.github.io/gpuweb/#dictdef-gpucommandbufferdescriptor)
|
||
#[cfg(feature = "local")] | ||
#[no_mangle] | ||
pub extern "C" fn wgpu_texture_create_default_view(texture_id: TextureId) -> TextureViewId { |
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.
nit: slightly prefer to keep both to avoid intentionally passing null
in libraries using the header, and the current proposal has both
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'm basing this off gpuweb/gpuweb#389, which is a tiny bit ahead
wgpu-native/src/instance.rs
Outdated
@@ -256,7 +256,7 @@ pub fn instance_get_adapter( | |||
|
|||
#[cfg(feature = "local")] | |||
#[no_mangle] | |||
pub extern "C" fn wgpu_instance_get_adapter( | |||
pub extern "C" fn wgpu_instance_request_adapter( | |||
instance_id: InstanceId, | |||
desc: &AdapterDescriptor, |
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.
nit: should probably be Option<&RequestAdapterOptions>
wgpu-native/src/pipeline.rs
Outdated
@@ -284,6 +326,8 @@ pub struct RenderPipelineDescriptor { | |||
pub depth_stencil_state: *const DepthStencilStateDescriptor, | |||
pub vertex_input: VertexInputDescriptor, | |||
pub sample_count: u32, | |||
pub sample_mask: u32, | |||
pub alpha_coverage_enabled: bool, |
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.
nit: alpha_to_coverage_enabled
Includes changes in texture view creation, enumeration mapping, binding types, and more.
@grovesNL wow, what a great review. Thank you!
Everything else is going to be addressed shortly. |
I addressed the comments but now failing to run cbindgen (again):
Eh, gotta make it spew out the errors properly some day Edit: magically resolved with |
Also found this to be relevant - servo/media#280 (comment) |
Build succeeded |
291: Update for wgpu-core r=grovesNL a=kvark Depends on gfx-rs#619 Closes gfx-rs#285 Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Includes changes in texture view creation, enumeration mapping,
binding types, and more.
This would be a nice target for our 0.3 release.