Commit Graph

15 Commits

Author SHA1 Message Date
João Capucho
357da63076
Patch ron version (#1986)
Require at least version 0.7.1 of ron, this version changed how floating points are
serialized by forcing them to always have the decimal part, this makes it backwards
incompatible with our tests because we do a syntatic diff and not a semantic one.
2022-06-15 15:17:59 -04:00
Dzmitry Malyshau
2ddc8d1929 Rename StorageClass to AddressSpace 2022-01-31 16:25:06 -05:00
Dzmitry Malyshau
8caa2bd87e Gather operations 2021-12-18 11:46:49 -05:00
Dzmitry Malyshau
8ffd6ba929 Remove top_level property of structs 2021-12-15 09:33:33 -05:00
Jim Blandy
e69a70bfb7
[spv-in] Permit pointers to runtime arrays only in StorageBuffer. (#1522)
* [spv-in] Change shadow.spv test input to use StorageBuffer.

The ecosystem around Naga will generally not be able to use Vulkan adapters that
don't support the SPV_KHR_storage_buffer_storage_class (which was incorporated
into SPIR-V 1.3), so we can assume it is present.

Changing the test not to use runtime-sized arrays in the Uniform storage class
will allow Naga to tighten up some validation checks.

* [spv-in] Permit pointers to runtime arrays only in StorageBuffer.

Fixes #1519.
2021-11-10 16:58:57 -05:00
Connor Fitzgerald
2f5a41cce9
Add insert/extractBits and pack/unpack functions (#1449) 2021-10-05 20:32:57 -04:00
Jim Blandy
944a693ae5 Use UniqueArena for types.
Ensure that each distinct type occurs only once in `Module::types`, so that we
can use `Eq` on `Type` or `TypeInner` for type equivalence, without being
confused by differing `Handle<Type>` values that point to identical types.

This removes a number of duplicate types from the ir snapshots.

Fixes #1385.
2021-09-27 15:17:41 -04:00
Jim Blandy
d44e2ad207 Simplify interpolation defaulting.
Replace `Module::apply_common_default_interpolation` with a simpler function
that handles a single `Binding` at a time. In exchange for the simplicity, the
function must be called at each point function arguments, function results, and
struct members are prepared. (Any missed spots will be caught by the verifier.)

This approach no longer requires mutating types in the arena, a prerequisite for
properly handling type identity.

Applying defaults to struct members when the struct declaration is parsed does
have a disadvantage, compared to the old whole-module pass: at struct parse
time, we don't yet know which pipeline stages the struct will be used in. The
best we can do is apply defaults to anything with a `Location` binding. This
causes needless qualifiers to appear in some output. However, it seems that our
back end languages all tolerate such qualifiers.
2021-09-27 15:17:41 -04:00
João Capucho
3049f63cad
[spv-in] new block parser (#1294)
* [spv-in] New two pass parser based

* [spv-in] Allow expressions defined in dominant block in different scopes

* Make the patch non breaking

* [spv-in] Allow scope transfers in phi instructions

* [spv-in] Remove unused stuff

* [spv-in] Handle switch merges as breaks

* Remove no longer needed stuff

* Revert some changes to prepare to merge

* Remove dead code

* Don't spill into local if in scope

* [spv-in] Documentation, comments, some renaming for clarity.

* Address comments

Co-authored-by: Jim Blandy <jimb@red-bean.com>
2021-09-10 08:51:05 -07:00
Dzmitry Malyshau
27e4ba59e4 Validate that SampleLevel::Exact isn't used for comparisons 2021-08-13 01:45:43 -04:00
Dzmitry Malyshau
bc4576c0a2 Make atomic operations to be statements 2021-08-10 21:48:02 -04:00
Dzmitry Malyshau
7c3cc904a0 [spv-in] fix storage buffer access decorations 2021-08-05 12:59:19 -04:00
pyrotechnick
2f516c0932
[wgsl] Storage buffer/texture access (#1142)
* Resurrect texture_storage_* tests
* Test parsing of `var<storage,write>`
* Default storage textures to READ
* Restore default features
* Fix glsl/hlsl/msl/spv front and back ends
* Add missing test outputs
* All-around fixes for the storage access

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-07-28 01:47:18 -04:00
Dzmitry Malyshau
20c4d2c3d1 Add MSAA depth texture type 2021-07-22 10:39:24 -04:00
Gordon-F
6cdd332cef Reorganize test snapshot folder 2021-06-19 10:19:04 -04:00