Skip to content
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

Update to latest WebGPU #154

Merged
merged 15 commits into from
Apr 15, 2021
Merged

Update to latest WebGPU #154

merged 15 commits into from
Apr 15, 2021

Conversation

almarklein
Copy link
Collaborator

@almarklein almarklein commented Apr 13, 2021

  • Copy latest IDL spec.
  • Apply some fixes to our IDL parser.
  • Check diff of structs to see if there are more field renames.
  • Run codegen and apply fixes in base.py and rs.py
  • Update examples, utils and tests accordingly.
  • Update pygfx.
  • Review the changes in base.py and rs.py.

Notable changes:

  • GPUCanvasContext.get_swap_chain_preferred_format(): now takes an adapter instead of a device.
  • GPUAdapter.extensions: is now called features.
  • GPUAdapter.request_device(): the extensions and limit args are now non_guaranteed_features and non_guaranteed_limits.
  • Device.default_queue: is now called queue.
  • Device.create_compute_pipeline(): the compute_stage arg is now called compute.
  • Device.create_bind_group_layout() has changed the required structure of the layout enty dicts.
  • Device.create_render_pipeline() has changed a lot in terms of shape of input dicts. See new docs.
  • Texture.create_view(): args mip_level_count and array_layer_count are default None instead of 0.
  • GPUCommandEncoder.begin_render_pass(): the color_attachments and depth_stencil_attachment arguments have their attachment field renamed to view.
  • Flag TextureUsage has field OUTPUT_ATTACHMENT renamed to RENDER_ATTACHMENT.
  • Enum BindingType is split up in different enums for buffer, sampler, sampled texture and storage texture.
  • Enum BlendFactor has some of its field names changed.
  • Enum VertexFormat has its field names changed, e.g. ushort2 -> uint16x2.

@almarklein
Copy link
Collaborator Author

Bijna!

wgpu/base.py Outdated Show resolved Hide resolved
@almarklein almarklein merged commit 5bec57d into main Apr 15, 2021
@almarklein almarklein deleted the webgpu branch April 15, 2021 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant