Commit Graph
8897 Commits
Author SHA1 Message Date
Andreas Reich 875cfb5961 buffers are now zero initialized for mappings
queue_write_buffer marks as initialized
2021-01-31 21:55:49 +01:00
bors[bot]andAndreas Reich 1668bb2451 Merge #1180
1180: Add dummy structs for indirect command buffers r=cwfitzgerald,kvark a=Wumpf

**Connections**
Review of #1159 which could make more use of this expressiveness patch of having the buffers spelled out.

**Description**
Add dummy structs for indirect command buffers and (bonus!) fix missing IndirectBufferOverrun error for IndirectDispatch.

**Testing**
squinting at it only 👁️👁️

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2021-01-31 20:41:22 +00:00
Andreas Reich 6b51328b2e Add public structs for indirect command buffers
and fix missing IndirectBufferOverrun error for IndirectDispatch
2021-01-31 21:32:33 +01:00
João Capucho b55aa51f65 Add support for function declarations with arguments
Change ParseError to be public
Change globals to default to private instead of throwing error
2021-01-30 13:44:39 -05:00
Dzmitry Malyshau be86f5b7cf Update README table 2021-01-30 11:54:15 -05:00
Dzmitry Malyshau 40974d503c Bump version to 0.3 and update changelog naga-v0.3.0 2021-01-30 11:48:37 -05:00
Dzmitry Malyshau b8e9c209b0 [mtl] fix unsigned constants, comparison level option 2021-01-30 15:14:38 +01:00
Dzmitry Malyshau 0bbeec7d55 Add shadow snapshot shader 2021-01-30 15:14:38 +01:00
Dzmitry Malyshau 3b9f517446 [mtl] implement continuing, fix Greater op and scoping 2021-01-30 15:14:38 +01:00
bors[bot]andDzmitry Malyshau 1e3eac2352 [rs] Merge #679
679: WGSL shader conversion for the examples r=grovesNL a=kvark

Blocked on:
  - ~~https://github.com/gfx-rs/naga/issues/335~~
  - ~~https://github.com/gfx-rs/naga/issues/336~~
  - ~~https://github.com/gfx-rs/wgpu/issues/1095~~
  - ~~https://github.com/gfx-rs/naga/pull/360~~
  - https://github.com/gfx-rs/gfx/pull/3622
  - ~~GL backend doing the program link check earlier~~

Converted:
- [x] boids
- [x] cube
- [x] mipmap
- [x] msaa-line
- [x] shadow
- [x] skybox
- [ ] texture-array
- [ ] water

Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
2021-01-30 06:05:49 +00:00
Dzmitry Malyshau 41a1c0e46f [rs] Convert cube, skybox, msaa-line, and mipmap, to WGSL
Validate example shaders in tests

Support WGSL on the Web via Naga

Port the shadow WGSL partially

Convert hello-compute and boids to WGSL

Conver the shadow's fragment shader to WGSL

Shader entry point refactor
2021-01-30 01:02:04 -05:00
bors[bot]andDzmitry Malyshau 89284e07a4 [rs] Merge #734
734: Update wgpu to the new render pipeline descriptor API r=grovesNL a=kvark

MAJOR API BREAKING CHANGE
Gets us https://github.com/gfx-rs/wgpu/pull/1176

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-01-30 02:44:01 +00:00
Baptiste Manson 0c725c0837 added function pow from spirv backend 2021-01-29 17:38:41 -05:00
Dzmitry Malyshau ea64ab0431 Check host shared decorations in the validator 2021-01-29 21:22:04 +01:00
Dzmitry Malyshau 0c5db60d69 [spv] fix depth sampler type 2021-01-29 21:05:15 +01:00
Dzmitry Malyshau edb342cffe [rs] Update wgpu to the new render pipeline descriptor API 2021-01-29 00:51:44 -05:00
bors[bot]andDzmitry Malyshau ac81f3e756 Merge #1179
1179: Fix depth bias documentation r=kvark a=kvark

**Connections**
Follow-up to #1178

**Description**
Clippy complained...

**Testing**
No need

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-01-29 05:27:29 +00:00
Dzmitry Malyshau 4099c2ca8e Fix depth bias documentation 2021-01-29 00:25:54 -05:00
bors[bot]andDzmitry Malyshau 513c08ecbb Merge #1178
1178: Add DepthBiasState, rename StencilStateFace r=kvark a=kvark

**Connections**
None

**Description**
Found the error in the `StencilStateFace` name and fixed it here.
Also identified that depth bias is a noticeable ergonomic offender, so moving it out into a struct, similar to what we have with stencil.

**Testing**
tested on wgpu-rs examples.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-01-29 05:09:44 +00:00
Dzmitry Malyshau 14eb99da87 Add DepthBiasState, rename StencilStateFace 2021-01-29 00:07:46 -05:00
bors[bot]andDzmitry Malyshau 6c0e652f86 Merge #1177
1177: Update gfx with the new iterator API r=kvark a=kvark

**Connections**
Gets https://github.com/gfx-rs/gfx/pull/3615 and https://github.com/gfx-rs/gfx/pull/3619

**Description**
Avoids a few `collect()` calls when talking to gfx.

**Testing**
just local playtests

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-01-28 17:42:08 +00:00
Dzmitry Malyshau 4764ff21e9 Update gfx with the new iterator API 2021-01-28 12:40:24 -05:00
Dzmitry Malyshau 4a13ce022b [spv] debug labels for types, local variables, and struct members 2021-01-28 17:28:48 +01:00
Dzmitry Malyshau 089a5597c6 [spv] implement the rest of binary operators 2021-01-28 17:28:48 +01:00
Dzmitry Malyshau 20b9aa6835 Address clippy issues 2021-01-28 17:28:48 +01:00
Dzmitry Malyshau 162079c160 Enable collatz and boids testing for spv-out 2021-01-28 17:28:48 +01:00
Dzmitry Malyshau 194a67edda [spv] separate block ID creation from contents writing 2021-01-28 17:28:48 +01:00
Dzmitry Malyshau 7d3342f2c9 [spv] Implement math comparison functions 2021-01-28 17:28:48 +01:00
Dzmitry Malyshau b9cc890ca6 [spv] implement loops 2021-01-28 17:28:48 +01:00
Dzmitry Malyshau 16521a94d0 [spv] implement trigonometry math functions 2021-01-28 17:28:48 +01:00
Dzmitry Malyshau 3177df2188 [spv] refactor the return statement handling 2021-01-28 17:28:48 +01:00
Dzmitry Malyshau e3328773d0 [spv] Refactor struct Block, implement Statement::Block 2021-01-28 17:28:48 +01:00
Timo de Kort 88f118a07d Working prototype 2021-01-28 17:28:48 +01:00
Dzmitry Malyshau dc98305bb8 Print out detailed WGSL errors 2021-01-28 01:22:10 -05:00
Dzmitry Malyshau 4f517f4af3 [wgsl] include the expected string into the error 2021-01-28 01:22:10 -05:00
bors[bot]andDzmitry Malyshau 63b0d36074 Merge #1176
1176: Rewrite RenderPipelineDescriptor according to aspects r=grovesNL,cwfitzgerald a=kvark

**Connections**
Fixes #1166

**Description**
Totally re-imagines the structure tree for describing the rendering pipeline, based on the aspects instead of logical steps.

**Testing**
Just local testing. I don't think there is any concern that these changes might not work, they just need the clients to adapt.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-01-28 06:21:57 +00:00
Dzmitry Malyshau cef0a30aa2 Add 0.7 changelog 2021-01-28 01:21:20 -05:00
Dzmitry Malyshau 3e4cb21b90 [wgsl] support simple block statements 2021-01-27 21:31:04 +01:00
Dzmitry Malyshau 0346b43982 Update the render pipeline API 2021-01-27 15:09:13 -05:00
Dzmitry Malyshau 61fd868a22 [spv] implement full image sampling 2021-01-27 11:24:27 -05:00
Dzmitry Malyshau ab2cf8b842 [wgsl] support vector type casts 2021-01-26 23:33:08 -05:00
bors[bot]andDzmitry Malyshau ba3595b8ab [rs] Merge #730
730: Fix the web backend in code and CI r=grovesNL a=kvark

Fixes #729

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2021-01-27 01:58:43 +00:00
Dzmitry Malyshau 8f6804caa1 [rs] Fix the web backend in code and CI 2021-01-26 20:58:13 -05:00
Dzmitry Malyshau 9c74468f81 [wgsl] enable access via rgba 2021-01-26 17:04:11 -05:00
Dzmitry Malyshau 292304b66f [wgsl] fix postfix expression parsing 2021-01-26 16:44:19 -05:00
Dzmitry Malyshau 986550aff8 [wgsl] fix and update storage load 2021-01-26 15:57:48 -05:00
Dzmitry Malyshau ce15aa62fc [spv] indexing values 2021-01-26 15:36:30 -05:00
bors[bot]andDzmitry Malyshau 60cd0f7e56 Merge #1173
1173: Handle zero-sized bindings as an error r=cwfitzgerald a=kvark

**Connections**
Fixes #1165

**Description**
Adds buffer IDs to the binding errors, also adds a variant for zero sized bindings.

**Testing**
Tested on a hand-written example.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-01-26 05:19:26 +00:00
Joshua Groves d7225b4eb6 [glsl-out] Improve formatting of whitespace 2021-01-25 23:57:54 -05:00
Joshua Groves 58f38ba61d [msl-out] Improve formatting of whitespace 2021-01-25 23:57:54 -05:00