Commit Graph
8897 Commits
Author SHA1 Message Date
bors[bot]andmitchmindtree bf9e2db4b3 Merge #527
527: Add `Clone` and `PartialEq` implementations for `SamplerDescriptor` r=kvark a=mitchmindtree

Helps when attempting to support multiple samplers in an immediate mode
context (e.g. easily compare sampler descriptors and check if I need to
add a command to switch bind groups).

Co-authored-by: mitchmindtree <mitchell.nordine@gmail.com>
2020-03-22 20:25:48 +00:00
bors[bot]andRukai 980f5412c4 [rs] Merge #212
212: Improve BufferCopyView documentation r=kvark a=rukai

groves suggested that the alignment/multiple requirements are not implemented yet.
So I changed the documentation to reflect that.
Ideally we would change the examples to demonstrate how to work around this requirement, but I think its best to wait until we know for certain that this IS a requirement, currently the WebGPU spec does not have this as a requirement.

Additionally it seems like every example except for the skybox example failed to follow this part of the WebGPU spec.
"Note: rowsPerImage must be zero for copies with a copySize.depth of 1, and must be greater than zero otherwise."
So I fixed those examples and documented the requirement on the field.

Co-authored-by: Rukai <rubickent@gmail.com>
2020-03-22 19:02:48 +00:00
Rukai 2a3e6e572b [rs] Improve BufferCopyView documentation 2020-03-22 23:24:43 +11:00
Aaron Loucks 60f9c07e9e [rs] Update WGPU deps to rev 08e8d406c1 2020-03-20 21:48:25 -04:00
bors[bot]andLachlan Sneff 514393ad05 [rs] Merge #208
208: Remove lifetime from SwapChainOutput r=kvark a=lachlansneff

The pr removes the lifetime from `SwapChainOutput`. It's not clear to me if the lifetime is necessary for soundness reasons, so let me know if so.

Resolves #207 

Co-authored-by: Lachlan Sneff <lachlan.sneff@gmail.com>
2020-03-20 20:25:04 +00:00
Dzmitry Malyshau 3ea6ca428f Move the global usage into the IR function 2020-03-20 16:23:35 -04:00
Lachlan Sneff ac7809cdcb [rs] Note that get_next_texture will error if a previous output is still alive. 2020-03-20 14:34:17 -04:00
msiglreith 72c115e056 Merge pull request #22 from msiglreith/shader-il
Shader from raw IL
2020-03-20 18:08:30 +01:00
Dzmitry Malyshau 55fab04353 Refactor the interface processor, many improvements in global variables handling in MSL 2020-03-19 22:36:26 -04:00
Dzmitry Malyshau 80a9254dbe Interface processor 2020-03-19 18:04:58 -04:00
mitchmindtree cce9d7a3f7 Add Clone and PartialEq implementations for SamplerDescriptor
Helps when attempting to support multiple samplers in an immediate mode
context (e.g. easily compare sampler descriptors and check if I need to
add a command to switch bind groups).
2020-03-19 19:44:11 +01:00
Lachlan Sneff af7a4282f2 [rs] Remove lifetime from SwapChainOutput 2020-03-19 11:43:38 -04:00
Dzmitry Malyshau df855bc2ff Makefile and RON converter parameters 2020-03-19 09:44:14 -04:00
bors[bot]andDzmitry Malyshau 08e8d406c1 Merge #526
526: Expose more copy commands to the wgpu-remote r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-03-18 12:51:19 +00:00
Dzmitry Malyshau 481b0db24d Expose more copy commands to the wgpu-remote 2020-03-17 18:57:23 -04:00
bors[bot]andDzmitry Malyshau d3e47fc5ae Merge #521
521: Texture component type r=kvark a=kvark

Matching the upstream spec...

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-03-17 16:58:34 +00:00
bors[bot]andmitchmindtree f836db800a Merge #525
525: Add `Clone` and `PartialEq` derives for `Texture(View)Descriptor` r=kvark a=mitchmindtree

I've come across use cases for these in nannou so thought I would add
them!

Co-authored-by: mitchmindtree <mitchell.nordine@gmail.com>
2020-03-17 13:03:02 +00:00
mitchmindtree f00ab00ad9 Add derive PartialEq to Extent3d 2020-03-17 13:05:13 +01:00
mitchmindtree 29d731f902 Add Clone and PartialEq derives for Texture(View)Descriptor
I've come across use cases for these in nannou so thought I would add
them!
2020-03-17 12:53:13 +01:00
bors[bot]andJoshua Groves 9c33efaad2 Merge #523
523: Move more types into wgpu-types r=kvark a=grovesNL



Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-03-17 03:07:50 +00:00
Joshua Groves b9259c0c8c Move more types into wgpu-types 2020-03-16 23:57:50 -02:30
bors[bot]andJoshua Groves 5fa3a74061 [rs] Merge #204
204: Return futures from request adapter/request device r=kvark a=grovesNL

Relevant to #175

Backporting some parts of #193 for async request adapter and async request device.

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-03-16 22:56:43 +00:00
bors[bot]andJoshua Groves 74bfc73158 Merge #522
522: Include `wgpu-types` in list of crates r=kvark a=grovesNL



Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-03-16 20:30:34 +00:00
Joshua Groves 1a2101e939 [rs] Return futures from request adapter/request device 2020-03-16 16:35:51 -02:30
Joshua Groves db858dd89e Include wgpu-types in list of crates 2020-03-16 15:58:31 -02:30
Dzmitry Malyshau c4e3fb4d36 Add texture component type field to BGL entry 2020-03-16 12:02:26 -04:00
bors[bot]andJoshua Groves 11d594750b [rs] Merge #203
203: Update winit r=kvark a=grovesNL

Use the latest version of winit (0.22)

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-03-16 14:34:26 +00:00
bors[bot]andDzmitry Malyshau 75fdfc0ef7 Merge #520
520: Update naming of bindings to entries r=kvark a=kvark

Matches https://github.com/gpuweb/gpuweb/pull/611

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-03-16 14:07:42 +00:00
Dzmitry Malyshau 7f966be455 Update naming of bindings to entries 2020-03-16 10:06:54 -04:00
bors[bot]andJoshua Groves 9564ae1f4d [rs] Merge #202
202: Remove `Hash` for ID types r=kvark a=grovesNL

Reverts some of the `Hash` derives added in #200 because we don't have a good way to support `Hash` for JavaScript objects (for the web backend) at the moment. JavaScript objects don't have a unique identifier that we can use for `Hash`, so any solution here would probably mean adding our own map of JS object<->unique ID.

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-03-16 13:59:17 +00:00
Joshua Groves 2a640b9611 [rs] Fix typo in readme 2020-03-16 09:31:35 -02:30
Joshua Groves 90f8d74c99 [rs] Update winit 2020-03-16 09:26:51 -02:30
Joshua Groves 0d7d4a160f [rs] Remove Hash for ID types 2020-03-16 08:53:51 -02:30
Dzmitry Malyshau 0de28d1656 [msl] operators, array access, and built-in calls 2020-03-15 23:59:49 -04:00
AIOOB 1ac92cd942 Fixup clippy lints and remove unsafe 2020-03-15 21:09:08 -04:00
bors[bot]andmitchmindtree fff08d2c63 [rs] Merge #200
200: Derive `Hash` and `PartialEq` for unique identifier wrapper types r=kvark a=mitchmindtree

This is particularly useful downstream for distinguishing between
instances of these types.

I was unsure about `Device` as I noticed it has a `Temp` field that
looks like it might eventually store some non-PartialEq/Hash-friendly
fields.

Let me know if you'd like me to add a derive for `Device` or if there
are any issues with those I have updated.

Co-authored-by: mitchmindtree <mitchell.nordine@gmail.com>
2020-03-15 23:18:13 +00:00
bors[bot]andAaron Loucks c91758dc4a [rs] Merge #201
201: Add note that `slot` refers to the index in RenderPipelineDescriptor r=kvark a=aloucks

Add note that `slot` refers to the index in `RenderPipelineDescriptor::vertex_buffers`

Also fixed intra-doc links for `set_vertex_buffer`.

Co-authored-by: Aaron Loucks <aloucks@cofront.net>
2020-03-15 23:04:27 +00:00
Aaron Loucks c89d7edff5 [rs] Add note that slot refers to the index in RenderPipelineDescriptor::vertex_buffers
Also fixed intra-doc links for `set_vertex_buffer`.
2020-03-15 15:38:31 -04:00
bors[bot]andDzmitry Malyshau fbff46dc8f [rs] Merge #197
197: Update for the latest spec changes r=grovesNL a=kvark

Blocked on https://github.com/gfx-rs/wgpu/pull/518

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2020-03-15 18:41:29 +00:00
mitchmindtree ebf97c2843 [rs] Derive Hash and PartialEq for unique identifier wrapper types
This is particularly useful downstream for distinguishing between
instances of these types.

I was unsure about `Device` as I noticed it has a `Temp` field that
looks like it might eventually store some non-PartialEq/Hash-friendly
fields.

Let me know if you'd like me to add a derive for `Device` or if there
are any issues with those I have updated.
2020-03-15 18:43:16 +01:00
Dzmitry Malyshau c467693253 Add quad -> MSL testing 2020-03-15 12:10:19 -04:00
Dzmitry Malyshau 4a72abb142 Remove Mul expression type 2020-03-15 12:10:19 -04:00
Dzmitry Malyshau 1957b09c4d Add WGSL parsing tests 2020-03-15 11:43:08 -04:00
Dzmitry Malyshau fa0485f03f [rs] Update for the latest spec changes 2020-03-15 11:25:06 -04:00
Dzmitry Malyshau a768af6011 Implement a fair bit of typifier logic, resolve access ids in WGSL 2020-03-15 10:59:12 -04:00
Dzmitry Malyshau 3c5a12412c Typifier lookups into constants, variables, and structs 2020-03-15 10:59:12 -04:00
Dzmitry Malyshau 6ba942330a Typifier skeleton 2020-03-15 10:59:12 -04:00
bors[bot]andJoshua Groves 39f17e5075 Merge #516
516: Move more shared types into wgpu-types r=kvark a=grovesNL



Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-03-15 02:01:36 +00:00
Joshua Groves b58c15815b Move more shared types into wgpu-types 2020-03-14 23:08:05 -02:30
bors[bot]andDzmitry Malyshau e4df6ee288 Merge #518
518: Wholesome spec update r=grovesNL a=kvark

Addresses https://github.com/gfx-rs/wgpu-rs/issues/196
Biggest change is that buffer binding is done one by one. There is a number of renamings of the fields, also the binding types are expanded.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-03-14 16:45:33 +00:00