Commit Graph
8323 Commits
Author SHA1 Message Date
Dzmitry Malyshau 09e589e5a6 [rs] Simplify the CI check script 2020-12-17 16:34:01 -05:00
Dzmitry Malyshau bafcc5ace5 [rs] Update wgpu with Naga fixes and OpenGL backend 2020-12-17 13:03:27 -05:00
bors[bot]andDzmitry Malyshau 89e585af61 Merge #1093
1093: Update naga and gfx, move the shader validation into a shader descriptor bit r=cwfitzgerald a=kvark

**Connections**
Includes https://github.com/gfx-rs/gfx/pull/3533 and a bunch of Naga things.

**Description**
Updates Naga with the new WGSL syntax, lots of fixes.
Large update of the GL backend.

**Testing**
Tested on some wgpu-rs examples.

Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
2020-12-17 16:34:28 +00:00
Dzmitry Malyshau f07cc8156b Update naga and gfx, move the shader validation into a shader descriptor bit 2020-12-17 11:33:47 -05:00
bors[bot]andDzmitry Malyshau 066a5978d5 Merge #1092
1092: Optimize submit() for no command buffers r=kvark a=kvark

**Connections**
Just a few bits I found when tinkering with API traces.

**Description**
No need to lock the world if there are no command buffers.

**Testing**
tested on API traces

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-12-16 20:05:27 +00:00
Dzmitry Malyshau b84301110c Optimize submit() for no command buffers 2020-12-16 15:02:09 -05:00
bors[bot]andEmanuele Dalla Longa 9090076253 [rs] Merge #678
678: Require labels for ComputePass and RenderPass  r=kvark a=infinitesnow

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

https://github.com/gfx-rs/wgpu/pull/1088/ improved labelling, update `wgpu-rs` and examples to match.

Change-Id: I1acc45a3023dfc78b6694bd4a28a0131f07b7ba7

Co-authored-by: Emanuele Dalla Longa <3xplosive.g@gmail.com>
2020-12-15 23:27:10 +00:00
Emanuele Dalla Longa 0b718aea93 [rs] Require labels to match gfx-rs/wgpu#1088
Change-Id: I1acc45a3023dfc78b6694bd4a28a0131f07b7ba7
2020-12-16 00:15:05 +01:00
bors[bot]andDzmitry Malyshau 42a8dc5b34 Merge #1090
1090: Clean up render pass labels r=kvark a=kvark

**Connections**
Follow-up to #1088 to fix https://github.com/gfx-rs/wgpu/issues/1089#issuecomment-745596393

**Description**
Render passes are recorded into their own command buffers under the hood, and I forgot to properly reset the labels on them.

**Testing**
Untested

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-12-15 22:30:22 +00:00
Dzmitry Malyshau cb67ef6542 Clean up render pass labels 2020-12-15 17:28:24 -05:00
bors[bot]andDzmitry Malyshau 03d2c57dc5 Merge #1088
1088: Fix and improve object labels and command markers r=cwfitzgerald a=kvark

**Connections**
Fixes a part of #1089 

**Description**
PR contains a bunch of small but important things:
  - reset the command buffer label after submission
  - add labels to compute and pass descriptors
  - actually push/pop markers for the scope of render bundle, compute passes
  - set the label to render pass command buffers
  - set labels on pipelines

**Testing**
Not tested much

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-12-15 18:10:59 +00:00
Dzmitry Malyshau 394135f725 Fix and improve object labels and command markers 2020-12-15 11:28:11 -05:00
Dzmitry Malyshau 583f218c9d Fix SPIR-V global binding check, add GLES 320 support (#333) 2020-12-15 09:31:08 -05:00
Pelle Johnsen 6bb40ce27b [glsl-in] Cast gl_VertexIndex to SInt (#332)
* [glsl-in] Cast gl_VertexIndex to SInt

* [glsl-in] Use conversion cast (gl_VertexIndex)

- Also cast gl_InstanceIndex

* [glsl-in] Simplify global var lookup

* [glsl-in] Fix missing comma
2020-12-15 09:24:48 -05:00
bors[bot]andZsolt Bölöny b369dd3954 [rs] Merge #677
677: Update to latest wgpu master r=kvark a=yzsolt

- Update to latest `wgpu` master
- Fix build error caused by https://github.com/gfx-rs/wgpu/pull/1077

Co-authored-by: Zsolt Bölöny <bolony.zsolt@gmail.com>
2020-12-14 19:12:27 +00:00
Zsolt Bölöny acf94e9321 [rs] Update to latest wgpu master 2020-12-14 17:57:27 +01:00
Dzmitry Malyshau 77657b4c76 Add skybox example snapshots 2020-12-13 10:20:57 -05:00
Dzmitry Malyshau 899a918bf2 [convert] allow entry point name for GLSL output 2020-12-13 10:20:57 -05:00
Dzmitry Malyshau f1ad97b049 [glsl-out] fix type conversion 2020-12-13 10:20:57 -05:00
Dzmitry Malyshau 018dfd6d29 [msl] fix metal namespacing, matrix construction and indexing 2020-12-13 10:20:57 -05:00
Dzmitry Malyshau 933ca3863b [spv] simplify the composing expression 2020-12-13 00:45:55 -05:00
Dzmitry Malyshau 96dcf8bd05 [spv] make the storage classes consistent across the expressions 2020-12-13 00:45:55 -05:00
Dzmitry Malyshau 2781705bef [spv] enforce the load/store semantics consistently 2020-12-13 00:45:55 -05:00
Dzmitry Malyshau a6240b4988 [spv] support transpose and access index on matrices 2020-12-13 00:45:55 -05:00
bors[bot]andConnor Fitzgerald cdda85e7c3 [rs] Merge #672
672: Add write_whole_texture_mips Helper r=kvark a=cwfitzgerald

Adds a helper in QueueExt for uploading an entire texture with all of its mips. Name very bikeshedable.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-12-13 05:45:03 +00:00
Dzmitry Malyshau 98857f09a2 Move Transpose into math functions 2020-12-13 00:41:23 -05:00
Dzmitry Malyshau 2d1006835a Fix WGSL variable storage classes, spv-out interface 2020-12-13 00:41:23 -05:00
Dzmitry Malyshau 211bec44a1 Improve texture sampling IR, update WGSL parsing of it 2020-12-13 00:41:23 -05:00
Dzmitry Malyshau 087b5555a6 Add tests for GLSL parsing 2020-12-13 00:41:23 -05:00
Dzmitry Malyshau 0efd6e75d7 [wgsl] update texture definitions and storage access
Add more tests, enhance the snapshot testing.
2020-12-12 12:46:24 -05:00
Dzmitry Malyshau dafca34877 Add block boolean to the structure types in IR
Also update WGSL syntax for structures.
Move the boids code into snapshots.
2020-12-12 12:46:24 -05:00
Connor Fitzgerald 7e05bba6c4 [rs] Add create_texture_with_data helper 2020-12-12 01:50:49 -05:00
Joshua Groves d18b73c3a7 Remove duplicate wgsl from test-data 2020-12-10 19:07:08 -05:00
Timo de Kort 6a6e3c28f9 Update simple.wgsl to latest syntax 2020-12-10 23:38:59 +01:00
bors[bot]andEmanuele Dalla Longa 01733a2f45 Merge #1086
1086: Add SHADER_READ usage bit to non-readonly buffers r=kvark a=infinitesnow

Change-Id: I99d189e7ef295a58c2179635f95656eb9a2f5fe6

**Connections**
Fixes #949

**Description**
 Non-readonly buffers are created with the STORAGE_WRITE usage flag, but that implies SHADER_READ too.

Co-authored-by: Emanuele Dalla Longa <3xplosive.g@gmail.com>
2020-12-10 16:22:43 +00:00
Emanuele Dalla Longa b3f18ff3c5 Add SHADER_READ usage bit to non-readonly buffers
Change-Id: I99d189e7ef295a58c2179635f95656eb9a2f5fe6
2020-12-10 17:20:29 +01:00
Dzmitry Malyshau b7744a1ec5 [wgsl] function lookup, improve error reporting 2020-12-10 10:20:56 -05:00
Dzmitry Malyshau 82c5cff605 [wgsl] refactor type declarations and function calls to avoid backups 2020-12-10 10:20:56 -05:00
Dzmitry Malyshau eeb479ae94 [wgsl] support const locals 2020-12-10 10:20:56 -05:00
Dzmitry Malyshau edf5d857b1 Add workgroup id and size builtins 2020-12-10 09:38:56 -03:30
Joshua Groves d71ebe2881 Add snapshots for function.wgsl 2020-12-10 00:24:07 -05:00
Joshua Groves 51cdb0403a Add snapshots for simple.wgsl 2020-12-10 00:24:07 -05:00
Joshua Groves 9a625a570e Add insta prototype 2020-12-10 00:24:07 -05:00
Dzmitry Malyshau b35e901249 Add all standard library functions to the IR 2020-12-09 15:43:36 -05:00
Dzmitry Malyshau 66d994566c [spv] force treating the built-in scalar types as unsigned 2020-12-08 22:55:21 -05:00
bors[bot]andMikko Lehtonen 99c9b253cf [rs] Merge #671
671: Add label to create_shader_module r=cwfitzgerald a=scoopr



Co-authored-by: Mikko Lehtonen <scoopr@iki.fi>
2020-12-09 00:23:25 +00:00
Mikko Lehtonen 88a6d957c7 [rs] Add label to create_shader_module 2020-12-08 22:56:17 +02:00
bors[bot]andNoah Charlton 69196d85a3 Merge #1077
1077: Remove extern "C" from set_index_buffer r=kvark a=DevOrc

**Connections**
Fixes an issue that is blocking gfx-rs/wgpu-native#61

**Description**
Moves the ffi definition of wgpu_render_bundle_set_index_buffer / wgpu_render_pass_set_index_buffer to wgpu-native. This is needed because wgpu-native has its own version of IndexFormat that is different than the wgpu_types version. 

**Testing**
My projects with wgpu-native work


Co-authored-by: Noah Charlton <ncharlton002@gmail.com>
2020-12-08 15:45:00 +00:00
Dzmitry Malyshau 6c1f4ac590 [wgsl] populate standard functions 2020-12-08 09:28:24 -05:00
Dzmitry Malyshau 5786aac9c4 [glsl] enable conversion testing for quad and boids 2020-12-08 09:25:59 -05:00