Fighting back the bovine forces#501
Conversation
There was a problem hiding this comment.
This is an autogenerated code review.
Checker summary (by rust_clippy):
The tool has found 0 warnings, 2 errors.
The .monocodus config not found in your repo. Default config is used.
Check config documentation here
There was a problem hiding this comment.
This is an autogenerated code review.
Checker summary (by rust_clippy):
The tool has found 0 warnings, 2 errors.
The .monocodus config not found in your repo. Default config is used.
Check config documentation here
827588d to
785a0fe
Compare
kvark
left a comment
There was a problem hiding this comment.
Thank you! We should be ready to land this. After all, it's only 250 LOC here, and we'll be able to shove a bunch off wgpu-types with this.
Noted a few small things. Also, please squash this!
cwfitzgerald
left a comment
There was a problem hiding this comment.
This is amazing! The api really cleaned up!
9837adc to
a336901
Compare
- BufferDescriptor - CommandEncoderDescriptor - RenderBundleDescriptor - TextureDescriptor - TextureViewDescriptor - PipelineLayoutDescriptor - SamplerDescriptor - BindGroupDescriptor - ProgrammableStageDescriptor - RenderPassDescriptor - RenderPipelineDescriptor - BindGroupLayoutDescriptor - VertexStateDescriptor - VertexBufferDescriptor - RenderBundleEncoderDescriptor - ComputePipelineDescriptor Also change anisotropy_clamp to use NonZeroU8
a336901 to
e9cf243
Compare
873: Grand cleanup and refactor of the descriptors in the API r=cwfitzgerald,grovesNL a=kvark **Connections** Cleanup follows gfx-rs/wgpu-rs#501 Fixes #871 Fixes #848 **Description** There is a lot of small and big things crumbled in here. The major one is where descriptors live, and how they are parametrized. Logic is the following: - if something is useful by wgpu-rs's API leave it in `wgpu-types` - if *in addition* it's useful to `wgpu-native`(i.e. has `repr(C)`), we possibly parametrize it (currently, only label is). - otherwise, the type is moved to `wgpu-core` and stripped of generics - remove all the builders Some medium-sized things: - moves the subscriber out (#871) - moves the `RenderCommand` into the `draw` module (which is meant to contain shared things) - makes `TextureViewDescriptor` fields optional, but receives it directly now (#848) - moves stencil stuff out into `StencilStateDescriptor`, so that we can derive `Default` for it - stop accepting raw strings for labels in the `Device` API: neither the clients, or gfx-rs need that shape, and it can't be safe Some smaller things: - using NonZeroU8 for anisotropy - using NonZeroU32 for descriptor count - putting sampler addressing modes into an array - add labels to command buffers and pipeline layouts - improves errors for exceeding binding limits **Testing** Tested on gfx-rs/wgpu-rs#503 Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>

"Good work boys, we'll get 'em next time!"