Commit Graph
9013 Commits
Author SHA1 Message Date
Zsolt Bölöny 7a31e4e333 [rs] Convert PrimitiveState::cull_mode to Option<Face> 2021-02-11 12:59:47 +01:00
Dzmitry Malyshau 20227e7c87 [msl] pass-through global resources in arguments 2021-02-10 23:22:14 -05:00
Dzmitry Malyshau dad02eb0a8 [msl-out] support all binary ops 2021-02-10 23:22:14 -05:00
Dzmitry Malyshau 3b4935550d Separate validation job on macOS 2021-02-10 23:17:18 -05:00
Dzmitry Malyshau bfbb30b375 Add CI action for validation of native shaders 2021-02-10 21:48:45 -05:00
bors[bot]andZsolt Bölöny 05a531191d Merge #1206
1206: Convert `PrimitiveState::cull_mode` to `Option<Face>` r=kvark a=yzsolt

**Connections**
Closes #1192 

**Description**
`wgpu::CullMode` was an enum with a `None` variant, which would be more idiomatic as an `Option` in Rust.

**Testing**
- `wgpu-rs` builds with the appropriate changes
- `wgpu-native` needs https://github.com/gfx-rs/wgpu-native/pull/71 merged before it can be updated


Co-authored-by: Zsolt Bölöny <bolony.zsolt@gmail.com>
2021-02-10 20:39:12 +00:00
Dzmitry Malyshau 3aa11838c7 Refactor the global usage code into a separate module, fix inheriting from the callees 2021-02-10 11:02:56 -05:00
Zsolt Bölöny 47a45bcaad Convert PrimitiveState::cull_mode to Option<Face> 2021-02-10 11:59:38 +01:00
Lachlan Sneff 5c209e8cfd [rs] Add Instance::poll_all 2021-02-10 02:15:18 -05:00
bors[bot]andDzmitry Malyshau f719dc0752 [rs] Merge #754
754: Update naga to gfx-10 r=kvark a=kvark

See https://github.com/gfx-rs/wgpu/pull/1205

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-02-09 15:22:59 +00:00
Dzmitry Malyshau 8ff65dce8d [rs] Update naga to gfx-10 2021-02-09 10:21:56 -05:00
bors[bot]andTnze 2dafc7c321 [rs] Merge #753
753: Use max function to ensure that the swapchain size is not less than 1. r=kvark a=Tnze

ATT

Co-authored-by: Tnze <cjd001113@outlook.com>
2021-02-09 15:12:44 +00:00
Dzmitry Malyshau be19a243b8 Merge pull request #28 from yzsolt/update-libloading-to-0.7
Update libloading to 0.7
2021-02-09 10:10:33 -05:00
bors[bot]andDzmitry Malyshau b1b44ca78c Merge #1205
1205: Update naga to gfx-10, add push constants validation r=kvark a=kvark

**Connections**
Picks up https://github.com/gfx-rs/gfx/pull/3632 with a bunch of Naga stuff

**Description**
Update!

**Testing**
Not much

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-02-09 15:08:45 +00:00
Dzmitry Malyshau 42d3f1f087 Update naga to gfx-10, add push constants validation 2021-02-09 10:06:55 -05:00
Zsolt Bölöny d6ad98b025 Update libloading to 0.7 2021-02-09 12:35:51 +01:00
Tnze e9d68a332d [rs] Use the "max" function to ensure that the swapchain size is not less than 1. For better readability. 2021-02-09 14:20:22 +08:00
Dzmitry Malyshau 4f19903f46 [wgsl] fix variable initializers wrt control flow 2021-02-09 00:47:41 -05:00
Dzmitry Malyshau 5b94ecd9b2 Add a snapshot for parsing spirv input 2021-02-08 15:59:47 -05:00
Dzmitry Malyshau cf0a86afd4 [spv-in] move all the image-related logic into a sub-module 2021-02-08 15:59:47 -05:00
Dzmitry Malyshau 6b9d3eafc8 [spv-in] Rewrite the comparison image/sample handling.
Keep track of the comparison property per global variable instead of  type.
Only track images that can actually be comparison-sampled.
Instead of mutating the type, just add a new type in the end
if we detect it to be necessary, cloning the old name.
2021-02-08 15:59:47 -05:00
Dzmitry Malyshau 10867879d4 [spv-in] support projection sampling and sampling from arrays 2021-02-08 11:31:45 -05:00
Dzmitry Malyshau 680fda9e1b [spv-out] fix initial ID 0 and 1 assignments 2021-02-08 00:20:37 -05:00
Dzmitry Malyshau 76094aa553 [mtl] fix nested loop service variable 2021-02-08 00:13:12 -05:00
Joshua Groves 832e259a03 Ues updated paths in Makefile 2021-02-07 18:16:26 -05:00
Joshua Groves 31be7099f2 Move snapshot inputs and outputs around 2021-02-07 18:16:26 -05:00
bors[bot]andImbris f72ff5e1ee [rs] Merge #752
752: Expose missing constants from wgpu-types r=cwfitzgerald a=Imberflur



Co-authored-by: Imbris <imbrisf@gmail.com>
2021-02-07 20:11:22 +00:00
Imbris 5a9801d86c [rs] Expose missing constants from wgpu-types 2021-02-07 15:08:17 -05:00
Dzmitry Malyshau 6f50ca6bee Push constant support 2021-02-07 11:54:56 -05:00
Dzmitry Malyshau 960aabec20 [spv-in] Implement OpCompositeInsert 2021-02-07 11:49:52 -05:00
Dzmitry Malyshau 75427cf95c [spv-in] handle matrix decorations 2021-02-07 11:44:47 -05:00
João Capucho 993521965d Add support for unary ops to glsl 2021-02-06 22:23:09 -05:00
bors[bot]andAndreas Reich dc18ac72e4 Merge #1190
1190: Fix crash on zero init of buffer with no more ref count r=kvark a=Wumpf

**Description**
Previously, if a buffer would no longer have any reference, the zero init step crashed when trying to unwrap its ref_count.

**Testing**
Tested successfully on https://github.com/Wumpf/blub/commit/54a0f4ff13fcd969d87e4469067c6403999f79e2 where this problem would pop up

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2021-02-06 22:15:44 +00:00
bors[bot]andAndreas Reich 9841b9b5dd Merge #1191
1191: Buffer zero init test for binding (and use in a compute shader) r=kvark a=Wumpf

**Connections**
Buffer zero init #1159 
Buffer zero crash on unused buffer fix #1190

**Description**
Tried to create a player ron file repro case for #1190 but didn't work out quite well (test keeps buffers alive even when I tried to go through an indirection via buffer copies). But with a bit of cleanup the test still felt very useful since it gives more coverage to buffer zero init.

Generally zero init is hard to test since the way to get the result is to map it which is one particular case of requiring zero init. But there's a few ways like in this test here where we look at what modifications a compute shader did to a buffer - since the buffer was not explicitly initialized, the outcome would be different if the compute shader would have seen a buffer without zero init.

Given how few tests there are right now this ofc implicitly tests a bunch of other things ;)

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2021-02-06 22:07:22 +00:00
João Capucho 708751a805 Add support for relational functions to glsl-in 2021-02-06 16:57:30 -05:00
João Capucho da8f9ecbb9 Add support for more math functions in glsl-in 2021-02-06 16:57:30 -05:00
João Capucho e0005211a3 Fix the way equality is handled in glsl 2021-02-06 16:04:24 -05:00
36fde2821b [rs] Merge #710
710: Implement read_buffer r=kvark a=fintelia

I'm not sure about the exact interface that makes sense, but this PR sketches out how read_buffer (and eventually also read_texture) could be implemented. 

Resolves #694

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Co-authored-by: Jonathan Behrens <fintelia@gmail.com>
2021-02-06 20:53:26 +00:00
Jonathan Behrens 7a02bfca78 [rs] Implement read_buffer utility function 2021-02-06 11:22:37 -05:00
bors[bot]andDzmitry Malyshau 0abcb247ca Merge #1201
1201: Don't check the index format for non-indexed calls r=kvark a=kvark

**Connections**
Fixes #1200

**Description**
Avoid the check that shouldn't be done.

**Testing**
Not tested, but should work.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-02-06 15:59:27 +00:00
Dzmitry Malyshau d0dcb105f5 Don't check the index format for non-indexed calls 2021-02-06 10:58:46 -05:00
Dzmitry Malyshau 251f800825 Remove the typifier hack for void functions 2021-02-06 10:42:54 -05:00
Dzmitry Malyshau d0c84a5ffa [spv-in] support for void function calls 2021-02-06 10:42:54 -05:00
Dzmitry Malyshau 11a3ed9837 WGSL support for void function calls 2021-02-06 10:42:54 -05:00
Dzmitry Malyshau d949d58f7b Statement for void function call 2021-02-06 10:42:54 -05:00
Andreas Reich fd810f839e merged buffer-zero-init-for-binding and buffer-zero-init-for-mapping-and-writing tests 2021-02-06 12:09:38 +01:00
Andreas Reich 3486fde638 Fix crash on zero init of buffer with no more ref count
Previously, if a buffer would no longer have any reference, the zero init step crashed when trying to unwrap its ref_count.
2021-02-06 11:11:10 +01:00
João Capucho f9f41fc9bf Add support for more math functions in glsl 2021-02-06 00:41:00 -05:00
João Capucho 2f9c957198 Add support for pow and fix mix arguments 2021-02-06 00:41:00 -05:00
João Capucho ae72fb0933 Add support for component wise comparison to glsl 2021-02-06 00:41:00 -05:00