Commit Graph
8897 Commits
Author SHA1 Message Date
João Capucho b0b4891045 [glsl-in] Document public api 2021-08-09 10:51:15 -04:00
João Capucho 48a4a9b902 [glsl-in] Cleanup public api 2021-08-09 10:51:15 -04:00
João Capucho 1aaf77489b [glsl-in] Improve error api and make more errors deferred 2021-08-09 10:51:15 -04:00
João Capucho f6e35f5b66 [glsl-in] Improved preprocessor and error handling 2021-08-09 10:51:15 -04:00
João Capucho a8a316da15 [glsl-in] API revamp
The new api allows for reuse while keeping some allocations and to
please the borrow checker in future work, it also splits the parser into
logical modules to make it easier to work on.
2021-08-09 10:51:15 -04:00
Agorgianitis Loukas 8796089636 Gather downlevel flags and require them all at once 2021-08-07 11:17:43 +03:00
Agorgianitis Loukas 5bc42843cf Add downlevel flag for storage buffers in vertex shaders 2021-08-06 21:22:16 +03:00
Connor Fitzgerald 7798534d42 Merge pull request #1773 from pythonesque/patch-1
Fix dynamic offset handling for render bundles
2021-08-06 13:55:51 -04:00
Joshua Yanovski bff04c1502 Fix dynamic offset handling for render bundles
I found this while testing a "bundlemark" version of bunnymark.
2021-08-06 10:38:35 -07:00
Agorgianitis Loukas dd24b48b11 Fix scissor test leak when presenting gles backend (#1772)
* Fix scissor test leak when presenting gles backend

* Set color mask before presenting gles backend to avoid potential leak
2021-08-06 10:54:09 -04:00
Zicklag 9310f264f1 Update Naga With New Storage Classes API (#1766) 2021-08-05 13:50:51 -04:00
João Capucho 0bd78ef85e [spv-out] Use NotEqual for boolean casts 2021-08-05 13:48:26 -04:00
Dzmitry Malyshau 7c3cc904a0 [spv-in] fix storage buffer access decorations 2021-08-05 12:59:19 -04:00
Zicklag 300039e247 Fix Invalid Type Attribute Error Message
The message previously made reference to the now-removed `access`
attribute.
2021-08-05 10:12:23 -04:00
Zicklag 553fc52f67 Implement adapter_is_surface_supported() for Web (#1767) 2021-08-05 10:01:43 -04:00
Gordon-F 4080bfe502 Add vec select to operators snapshot 2021-08-05 09:43:47 -04:00
Gordon-F b2e51c97c8 [glsl-out] Handle wgsl vector version of select 2021-08-05 09:43:47 -04:00
João Capucho 2ff7dcb417 [glsl-in] Fix mix ordering for boolean selector
The mix builtin is defined with the inverse order for it's arguments
compared to the IR when the selector is a boolean vector.
2021-08-04 12:39:36 -04:00
João Capucho a1395ddb99 [glsl-in] Fix matrix constructor with a scalar
Glsl defines that if a matrix constructor is called with only a scalar
it's result will be the matrix where the scalar is used if the row and
column are equal and everywhere else a zero
2021-08-04 12:39:36 -04:00
João Capucho 151a36352e [glsl-in] Be more conservative with vector resizes 2021-08-04 12:39:36 -04:00
João Capucho de6399a9c7 [glsl-in] Follow spec when choosing default layout 2021-08-04 12:39:36 -04:00
João Capucho 5ec129bbf0 [glsl-in] Lower the for loop init expression 2021-08-04 12:39:36 -04:00
João Capucho ec0d97d961 [glsl-in] Respect user defined interpolation 2021-08-04 12:39:36 -04:00
Dzmitry Malyshau 6f21004369 Allow mixing on a scalar selector 2021-08-04 12:09:05 -04:00
João Capucho a90aa9817b [glsl-in] Add support for non constant global init
Glsl allows things such as

```glsl
layout (location = 0) in vec4 a;
vec4 b = a;
```

In this case `b` depends on `a` which can't be known at compile time,
so it's necessary to add a small prologue to the entry point to
initialize it.
2021-08-04 12:07:17 -04:00
João Capucho 057dc3100d [glsl-in] Remove support for multiple entry points 2021-08-04 11:06:57 -04:00
Lonsdaleiter 64ffdd52ad Added is_surface_supported (#1763) 2021-08-04 14:27:08 +00:00
Dzmitry Malyshau 80cf1ffff9 Implement onSubmittedWorkDone 2021-08-04 01:03:26 -04:00
Mikko Lehtonen 5d9c276c82 Include naga diagnostic in the parse error (#1760)
Wraps the Naga's `ParseError` with `NagaParseError` type, that uses the
Naga's full error formatting for its `Display` impl, including shader
source.
2021-08-03 17:27:34 -04:00
João Capucho 6f476eeafe [glsl-in] Fix span of gvec3 in layouter 2021-08-03 13:58:25 -04:00
João Capucho c084e2cfa8 [glsl-in] Handle Pow in constant evaluation 2021-08-03 13:58:25 -04:00
João Capucho da77e1f847 [glsl-in] Accept precision in local variable 2021-08-03 13:58:25 -04:00
João Capucho bcfe1f6f28 [glsl-in] Parse some more memory qualifiers 2021-08-03 13:58:25 -04:00
João Capucho 08302b5078 [glsl-in] Fix missing implicit conversion in mix 2021-08-03 13:58:25 -04:00
João Capucho fde91c1d94 [glsl-in] Implicit splat min builtin 2021-08-03 13:58:25 -04:00
João Capucho 9742f6820a [glsl-in] Invalidate the expression in sampled_to_depth 2021-08-03 13:11:31 -04:00
João Capucho bd16bf90d0 [glsl-in] Unify depth_set and qualifiers 2021-08-03 13:11:31 -04:00
João Capucho 244d58e8ff [glsl-in] Add support for depth_ref 2021-08-03 13:11:31 -04:00
João Capucho 717063eb21 [glsl-in] Convert Sampled image to depth image 2021-08-03 13:11:31 -04:00
Dzmitry Malyshau b9d18a1699 Remove bors config (#1759) 2021-08-03 11:57:55 -04:00
Dzmitry Malyshau 50da3f33ba Merge pull request #1758 from kvark/windows-error
Fix error with resolver=1 on non-Windows
2021-08-03 11:52:54 -04:00
Mikko Lehtonen 78e4cd5dbc Remove AsDisplay trait in error formatting 2021-08-03 11:51:52 -04:00
Mikko Lehtonen 019dca3cfa Error formatting impls closer to errors
This is achieved by making a ErrorFormatter helper that is passed to
fmt_pretty, making the impls a lot simpler.
2021-08-03 11:51:52 -04:00
Mikko Lehtonen e4cdddc639 Move error formatting to wgpu-core 2021-08-03 11:51:52 -04:00
João Capucho d6643086f3 Check documentation errors in CI 2021-08-02 22:46:06 -04:00
João Capucho d39f6780a7 Documentation fixes 2021-08-02 22:46:06 -04:00
Jim Blandy b7a4ee1d2d [spv-out] Document back::spv::Writer::write_varying. 2021-08-02 22:34:52 -04:00
Jim Blandy e4931e106d Document EntryPoint. 2021-08-02 22:33:32 -04:00
Connor Fitzgerald 11d31d5377 Merge pull request #1753 from euclio/wiki-link
update link to wgpu users wiki
2021-08-01 19:56:59 -04:00
Connor Fitzgerald 61b1a36225 Merge pull request #1754 from katharostech/bytemuck-hello-compute-output
Use Bytemuck to Cast Hello Compute Output
2021-08-01 19:56:36 -04:00