Update API according to the upstream spec#285
Conversation
grovesNL
left a comment
There was a problem hiding this comment.
Some other notes skimming through the recent spec history:
copyImageBitmapToTextureshould be added (https://gpuweb.github.io/gpuweb/#dom-gpucommandencoder-copyimagebitmaptotexture)LoadOphas changed (https://gpuweb.github.io/gpuweb/#dom-gpurenderpasscolorattachmentdescriptor-loadvalue)PipelineStageDescriptorhas been renamed toProgrammableStageDescriptor(https://gpuweb.github.io/gpuweb/#dictdef-gpuprogrammablestagedescriptor)copyBufferToBufferargument names changed, i.e.src->source(https://gpuweb.github.io/gpuweb/#dom-gpucommandencoder-copybuffertobuffer)RasterizationStateDescriptorshould be optional (maybe already covered by a default somewhere?)BufferBinding'ssizeshould be optional (maybe already covered by a default somewhere?)- We're missing an optional
CommandBufferDescriptorinfinish(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.
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.
I'm basing this off gpuweb/gpuweb#389, which is a tiny bit ahead
wgpu-native/src/instance.rs
Outdated
| 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.
nit: should probably be Option<&RequestAdapterOptions>
wgpu-native/src/pipeline.rs
Outdated
| pub vertex_input: VertexInputDescriptor, | ||
| pub sample_count: u32, | ||
| pub sample_mask: u32, | ||
| pub alpha_coverage_enabled: bool, |
There was a problem hiding this comment.
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.