Dzmitry Malyshau
c5fe1d53c7
[dot] function calls
2021-03-16 22:08:06 -04:00
Dzmitry Malyshau
259a56761f
Consider dynamic arrays to have at least 1 element for the layout
2021-03-16 22:08:06 -04:00
Dzmitry Malyshau
2b888e4c09
Detect the forward function calls
2021-03-16 22:08:06 -04:00
bors[bot] and Dzmitry Malyshau
5d993efc85
Merge #1267
...
1267: Update naga to gfx-15 r=kvark a=kvark
**Connections**
Fixes #1228 (huge DX12 leak in command allocation)
Includes https://github.com/gfx-rs/gfx/pull/3676 , https://github.com/gfx-rs/gfx/pull/3679 , https://github.com/gfx-rs/gfx/pull/3680 , https://github.com/gfx-rs/gfx/pull/3681 , and the relevant Naga stuff.
**Description**
Updates Naga and gfx.
**Testing**
Tested on wgpu-rs examplse
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com >
2021-03-16 17:07:20 +00:00
Luca Casonato
82932d1f59
chore: validate offset + size in get_mapped_range ( #1266 )
...
* chore: validate offset + size in get_mapped_range
This commit introduces out of bounds & offset validation for
buffer_get_mapped_range, like described in the WebGPU spec. See
https://gpuweb.github.io/gpuweb/#dom-gpubuffer-getmappedrange .
Closes #818
* review comments
* fmt
* fix test
* fix tests
* update error message
* review comment
* use wgt::BufferAddress
* clippy
2021-03-16 13:00:44 -04:00
Dzmitry Malyshau
3b1b11f441
Update naga to gfx-15
2021-03-16 12:52:32 -04:00
Dzmitry Malyshau
196523de78
Add v0.4 changelog
2021-03-15 22:34:56 -04:00
Dzmitry Malyshau
7de42d6f68
Don't panic too fast on failed analysis
2021-03-15 22:34:56 -04:00
Wumpf
2bda1508f1
[rs] Added example for conservative rasterization ( #791 )
...
* Example for conservative rasterization
* Update to wgpu-core/types 717c2d73e7
* conservative-raster example: fix wglsl const & readme
* conservative raster example: optional lines, no more interaction
2021-03-15 22:33:44 -04:00
Dzmitry Malyshau
08eaad89db
Implement default layout in the IR and WGSL
2021-03-15 22:27:35 -04:00
Dzmitry Malyshau
e80723aa12
[rs] Use implicit layout for hello-compute
2021-03-15 11:21:42 -04:00
Matúš Talčík
889e487b62
spv-in: fix classification of back edges
...
fix clippy
another fix
2021-03-15 11:09:53 -04:00
Dzmitry Malyshau
0945889dd7
[msl] filter out entry points based on the bindings
2021-03-15 10:31:45 -04:00
Dzmitry Malyshau
7d47a1b585
[spv-in] re-order the functions for the IR
2021-03-15 09:35:13 -04:00
Dzmitry Malyshau
20979b4800
[wgsl] type inference for constants
2021-03-15 01:31:57 -04:00
Wumpf
717c2d73e7
Add CONSERVATIVE_RASTERIZATION native feature ( #1263 )
...
* Add CONSERVATIVE_RASTERIZATION native feature
* update gfx to cd3042d8c02d9dc7fc74ac8c292099c9789f6d43
* error for polygon mode not fill +conservative raster
2021-03-14 20:43:02 -04:00
Lain-dono
4fb82bd955
[spv-out] implement derivatives
2021-03-14 20:34:59 -04:00
bors[bot] and Dzmitry Malyshau
23c5e83167
[rs] Merge #790
...
790: Update to naga-14 r=kvark a=kvark
Depends on https://github.com/gfx-rs/wgpu/pull/1262
Makes our shaders nicer, and the uniformity analysis less cranky :)
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com >
2021-03-14 05:51:10 +00:00
Dzmitry Malyshau
d1d941229c
[rs] Update to naga-14
2021-03-14 00:50:35 -05:00
bors[bot] and Dzmitry Malyshau
5e15980bb5
Merge #1262
...
1262: Update to naga-14 r=kvark a=kvark
**Connections**
Depends on https://github.com/gfx-rs/naga/pull/552 and https://github.com/gfx-rs/gfx/pull/3675
**Description**
Just an update of Naga
**Testing**
Tested on wgpu-rs examples
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com >
2021-03-14 05:28:46 +00:00
Dzmitry Malyshau
280c066e65
Update to naga-14
2021-03-14 00:27:57 -05:00
Dzmitry Malyshau
32a11752af
Rename FragCoord builtin into Position
2021-03-13 23:26:19 -05:00
Dzmitry Malyshau
ebcd815250
Update IR to have entry points with inputs/outputs
2021-03-13 23:26:19 -05:00
Dzmitry Malyshau
58a4e330dc
[glsl-out] fix cached expressions
2021-03-13 11:52:23 -05:00
Dzmitry Malyshau
7ebd96b597
Fix uniformity requirements of emitted expressions
2021-03-12 16:21:08 -05:00
bors[bot] and Dzmitry Malyshau
7af0f3137d
Merge #1258
...
1258: Lint all the things r=kvark a=kvark
**Connections**
Fixes #1250
**Description**
Refactors the code to satisfy the linter, configures it, and enables on CI.
**Testing**
`cargo clippy` saves the dau
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com >
2021-03-12 17:40:57 +00:00
Dzmitry Malyshau
231bba03a1
Lint all the things
2021-03-12 12:39:04 -05:00
Dzmitry Malyshau
9e5cc4c9e4
Prevent matching on a reference once and for all
2021-03-12 11:35:09 -05:00
Dzmitry Malyshau
dd273e254a
Distinguish between expression uniformity and function uniformity
2021-03-11 10:14:47 -05:00
Gordon-F
74d1fdbf2a
[glsl-out] Return reflection info to users
2021-03-10 17:10:58 -05:00
bors[bot] and Dzmitry Malyshau
763c14a6d9
Merge #1254
...
1254: Fix swapchain resize in the player r=kvark a=kvark
**Connections**
Fixes 1253
**Description**
I was fixing this recently, and I'm not sure how it worked, because there is a big inner `loop` that I didn't notice before 😅 .
So now we exit the inner loop upon resize.
**Testing**
Tested on the supplied API trace
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com >
2021-03-10 20:37:37 +00:00
Dzmitry Malyshau
eef4a75454
Fix swapchain resize in the player
2021-03-10 15:34:21 -05:00
Igor Shaposhnik
25fe522423
[glsl-out] Properly write array type
2021-03-10 15:17:07 -05:00
bors[bot] and Dzmitry Malyshau
db923b038e
[rs] Merge #786
...
786: Update to naga-13 r=kvark a=kvark
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com >
2021-03-10 05:41:35 +00:00
Dzmitry Malyshau
d754964b08
[rs] Update to naga-13
2021-03-10 00:41:04 -05:00
bors[bot] and Dzmitry Malyshau
0fa52d3826
Merge #1252
...
1252: Fix Vulkan Portability check r=kvark a=kvark
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com >
2021-03-10 05:23:59 +00:00
Dzmitry Malyshau
80fe0d8fdd
Fix Vulkan Portability check
2021-03-10 00:23:09 -05:00
Anthony Cowley and Dzmitry Malyshau
f01feacc2e
Update gfx and naga to gfx-13 tag ( #1248 )
...
* wgpu-core: update gfx-hal usage related to sparse resources
* wgpu-core: support naga gfx-13
* Update gfx and naga dependencies to gfx-13 tag
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com >
2021-03-10 00:04:16 -05:00
Dzmitry Malyshau
f5ee791912
More error information for uniformity analysis
2021-03-09 22:54:03 -05:00
bors[bot] and Dzmitry Malyshau
6f49f041d3
Merge #1251
...
1251: Don't panic on pipeline creation errors r=kvark a=kvark
**Connections**
Related to Gecko crashes.
**Description**
We shouldn't ever panic in `wgpu`. The panic can only occur if there is internal inconsistency. For any invalid workloads, submitted by the user, we should produce errors instead.
**Testing**
Not tested
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com >
2021-03-10 03:29:52 +00:00
Dzmitry Malyshau
4f7cd45ea7
Don't panic on pipeline creation errors
2021-03-09 22:24:57 -05:00
Igor Shaposhnik
f586d3e240
[glsl-out] Workaround lod array shadow as textureGrad
2021-03-09 15:08:08 -05:00
Dzmitry Malyshau
e7c1415ca4
[spv-in] really consider variables as pointers
2021-03-09 10:10:10 -05:00
Dzmitry Malyshau
7c26320cce
[spv-in] defer function call patching to the end of the module
2021-03-09 10:10:10 -05:00
Dzmitry Malyshau
d433ee81e6
Relax array and block structure validation
2021-03-09 09:55:17 -05:00
Dzmitry Malyshau
13d7a353e0
Switch entry points from map to a vec
2021-03-07 12:11:49 -05:00
Dzmitry Malyshau
6afd72b8dd
Relax interpolation validation for vertex outputs
2021-03-06 23:41:53 -05:00
Dzmitry Malyshau
e92b35725c
[spv-in] work around integer built-ins for compute
2021-03-06 23:11:14 -05:00
Dzmitry Malyshau
2045a4a7be
Use BOOL_WIDTH everywhere
2021-03-06 11:01:14 -05:00
Dzmitry Malyshau
dd823a4b84
Enforce pointer semantics at the type level.
2021-03-06 11:01:14 -05:00