naga:master commitshttps://gitlab.fi.muni.cz/xbela1/naga/-/commits/master2022-01-01T21:22:34+01:00https://gitlab.fi.muni.cz/xbela1/naga/-/commit/ab73ee5dbd6f3b94cf342e5cee4fced31206fbadImprove SPIRV to WGSL translation2022-01-01T21:22:34+01:00Martin Beľamartin.bela.sk@gmail.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/4cb91f2c98ab97d42442aa5b8da05367f263d227cli: option to keep coordinate space unchanged (#1460)2021-10-13T08:21:29-04:00Dzmitry Malyshaukvarkus@gmail.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/3b499811116dd4a29449af134181e28878a9e0a4Bump version to 0.7.12021-10-12T11:44:13-04:00Dzmitry Malyshaukvarkus@gmail.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/ee450c1ee4da4e46bc482b3bcdd71600d387a384Fix float-bool casts in MSL, SPV, and HLSL backends (#1459)2021-10-12T11:42:20-04:00Dzmitry Malyshaukvarkus@gmail.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/3a2f7e611e4fe8ec50d9bb365916f22e7c30e46cRelease 0.7 (#1455)2021-10-07T18:04:30-04:00Dzmitry Malyshaukvarkus@gmail.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/943235cd5e91df9a1d41c60f525d26734bc0d261[glsl-out] Convert modulo operator on float to SPIR-V OpFRem equivalent funct...2021-10-07T16:59:39-04:00Igor ShaposhnikGordon-F@users.noreply.github.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/2e7d629aefe6857ade4f96fe2c3dc1a09f0fa4db[spv-in] Fix bitfieldExtract/Insert argument types (#1453)2021-10-07T09:15:38-04:00Connor Fitzgeraldconnorwadefitzgerald@gmail.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/0e3fbc81664a263e8be278d11a6083b227a5b1a2Replace pointer-access.spv snapshot test with WGSL source. (#1450)2021-10-06T16:30:36-04:00Jim Blandyjimb@red-bean.com
The original pointer access test used SPIR-V for its input because WGSL didn't
have a working pointer indirection operator at the time. Now that it does, we
can just write this test in WGSL directly.
Fixes #1432.https://gitlab.fi.muni.cz/xbela1/naga/-/commit/943e321bc697ccedab4618e1b3733034abc42390Fix lazy CI for snapshots2021-10-05T21:58:39-04:00Dzmitry Malyshaukvarkus@gmail.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/2f5a41cce9aff2818b64c6faaf804e9eec969eefAdd insert/extractBits and pack/unpack functions (#1449)2021-10-05T20:32:57-04:00Connor Fitzgeraldconnorwadefitzgerald@gmail.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/3e1244c5cbff24506b82bed906e283260fc19849Make shader validation under a separate feature (#1437)2021-10-05T15:11:32-04:00Igor ShaposhnikGordon-F@users.noreply.github.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/da00bf2be6a8c3cd27153d820cc15e0470e4a1b8[glsl-in] Always use uint for array size (#1448)2021-10-05T13:05:47-04:00João Capuchojcapucho7@gmail.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/71a75d727d2a9ff898b3bc50f94728be7efaae87[glsl-out] Es: convert 1D images to 2D (#1436)2021-10-03T23:01:44-04:00João Capuchojcapucho7@gmail.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/b34fa5f2cc2d4ddd42b64125f811fb51ace942e5[glsl-in] Fix array index parsing for 1D images (#1445)2021-10-03T16:22:14+00:00João Capuchojcapucho7@gmail.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/f01eb723780691b20b2debb8f4d31e505e085816[Snapshots] Allow a blacklist of entrypoints for glsl-out (#1444)2021-10-02T23:22:49-04:00João Capuchojcapucho7@gmail.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/f30f3a3db6e126e8e07531a693ea1e28832087dbProperly type-check `Expression::Select` arguments. (#1442)2021-10-01T12:47:39-04:00Jim Blandyjimb@red-bean.com
Require the `accept` and `reject` arguments to `select` to be scalars or
vectors, per WGSL spec.https://gitlab.fi.muni.cz/xbela1/naga/-/commit/ea50486b2dfce3e41411aa50e23646768d9558d0Forbid unsized structs as final members of structs. (#1443)2021-10-01T09:40:18-04:00Jim Blandyjimb@red-bean.com
WGSL says:
> - The last member of the structure type defining the store type for a variable
> ... may be a runtime-sized array.
>
> - A runtime-sized array must not be used as the store type or contained within
> a store type in any other cases.
Thus, a struct whose final member is a struct whose final member is a
runtime-sized array is verboten.https://gitlab.fi.muni.cz/xbela1/naga/-/commit/4ea2d96cfb697079d240db5ed4ad41fbd0c7730dVarious doc fixes. (#1440)2021-09-30T08:56:09-04:00Jim Blandyjimb@red-bean.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/4ef1cc403b0a6be96e88f73f1e71680a97199cb1Remove Namer::call_unique. (#1439)2021-09-29T19:33:38-04:00Jim Blandyjimb@red-bean.com
Replace uses of `call_unique` with uses of `call` and `call_or`, which becomes
public. It's not clear when `call_unique` is correct to use, and avoiding a few
numeric suffixes here and there isn't worth it.https://gitlab.fi.muni.cz/xbela1/naga/-/commit/92a97fb7d5a5edfe363b38f69cff22ba0a7bc1d0Simplify implementation of `Namer::namespace`. (#1438)2021-09-29T15:55:37-04:00Jim Blandyjimb@red-bean.com
Eliminate `Namer::namespace_index` and remove namespace indices from
`Namer::unique` keys. Instead, implement `Namer::namespace` by just swapping in
a fresh table for the duration of the call.
Create the fresh hash table with the right initial capacity. The prior
implementation did manage to avoid allocations by sharing a hash table, and we'd
like to not lose that advantage entirely.
This has no effect on generated code.https://gitlab.fi.muni.cz/xbela1/naga/-/commit/a4bf25a0d5b87a7f0fdd85eac1e2e5041d536f21Emit std430 layout qualifiers for storage buffers (#1435)2021-09-29T12:24:34-04:00Igor ShaposhnikGordon-F@users.noreply.github.com
* Remove unused petgraph dependency from glsl-out
* Emit std430 layout qualifiers for storage buffershttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/2e73e486570e62171058bbfe88a69f2de50997adWhen writing snapshots, reliably identify which writer has failed. (#1427)2021-09-28T13:42:26-04:00Jim Blandyjimb@red-bean.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/3e992d8bbfa1c587c5fc6ba760d286c9a4977e84Address 'unused variable' warnings when 'span' feature is off. (#1433)2021-09-27T19:17:20-04:00Jim Blandyjimb@red-bean.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/004a12e21d470c854c539d882bae8c953683b202[spv-out] option to clamp frag_depth (#1431)2021-09-27T23:00:10+00:00Dzmitry Malyshaukvarkus@gmail.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/21324b8feaecd5808ea32997dc4a64cbef8640abUpdate WGSL grammar for pointer access. (#1312)2021-09-27T18:49:28-04:00Dzmitry Malyshaukvarkus@gmail.com
* Update WGSL grammar for pointer access.
Comes with a small test, which revealed a number of issues in the backends.
* Validate pointer arguments to functions to only have function/private/workgroup classes.
Comes with a small test. Also, "pointer-access.spv" test is temporarily disabled.https://gitlab.fi.muni.cz/xbela1/naga/-/commit/38d74a7f0aa723355a35a3011d044f59d38e79a6[glsl-in] Use intermediate local if storage class isn't function2021-09-27T21:09:08+01:00João Capuchojcapucho7@gmail.com
Automatically spills to a local variable function call arguments to
parameters expecting a pointer where the argument storage class isn't
function since the storage classes wouldn't match.https://gitlab.fi.muni.cz/xbela1/naga/-/commit/aa08cf94a4da1cad7ff8bef27611ff0650bdfb02[spv-in] preserve case order when reusing blocks2021-09-27T16:01:43-04:00João Capuchojcapucho7@gmail.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/8122598fe790896bd689fa24371408760519196f[wgsl-out] Correct handling of named pointer expressions.2021-09-27T16:01:43-04:00Jim Blandyjimb@red-bean.com
Treat expressions in `Function::named_expressions` like WGSL `let` declarations,
assuming that the Load Rule was applied to the rhs of the declaration, meaning
that their values are always `Indirection::Ordinary`.
Split `write_expr_plain_form` out from `write_expr_with_indirection`, to clean
up the parenthesis generation: no more `opened_paren` variable, just function
calls. This makes the early return for named expressions neater.
Fixes #1382.https://gitlab.fi.muni.cz/xbela1/naga/-/commit/7b023ce396967c20f660655a2aba72a2e5e1c387[wgsl-out] Make plain_form_indirection an associated fn of Writer.2021-09-27T16:01:43-04:00Jim Blandyjimb@red-bean.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/f3ea2130a45f06a1fbbd6e7f0364a32dcd7d3965[wgsl-in]: Correctly compare pointer types.2021-09-27T16:01:43-04:00Jim Blandyjimb@red-bean.com
Treat `TypeInner::ValuePointer` and `TypeInner::Pointer` as equivalent by
converting them to a canonical form before comparison.
Support `ValuePointer` in WGSL type output.
Fixes #1318.https://gitlab.fi.muni.cz/xbela1/naga/-/commit/6e4401ae964e88a506590cc05049463b96343eecRename `UniqueArena` methods to more closely resemble `HashSet`.2021-09-27T15:17:41-04:00Jim Blandyjimb@red-bean.com
`UniqueArena::fetch_or_append` becomes `insert`.
`UniqueArena::try_get` becomes `get_handle`, by analogy with `get`, that takes a
type as a key.https://gitlab.fi.muni.cz/xbela1/naga/-/commit/944a693ae5aec702d58d321b809762818f6bca7aUse `UniqueArena` for types.2021-09-27T15:17:41-04:00Jim Blandyjimb@red-bean.com
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.https://gitlab.fi.muni.cz/xbela1/naga/-/commit/d026577a913ea4d849995a4a622dca244f872ffaConsolidate Handle construction code.2021-09-27T15:17:41-04:00Jim Blandyjimb@red-bean.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/f91e95b22e4cde9537d58443a6f7fe8930451621[glsl-in]: Register new types as necessary during constant solving.2021-09-27T15:17:41-04:00Jim Blandyjimb@red-bean.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/d44e2ad207883f47019316ccbd6f02c27b27cde9Simplify interpolation defaulting.2021-09-27T15:17:41-04:00Jim Blandyjimb@red-bean.com
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.https://gitlab.fi.muni.cz/xbela1/naga/-/commit/73f9d072079246ccf119c4e27de2b624afa6e466[Typifier] Some relational functions output vectors2021-09-26T21:19:08-04:00João Capuchojcapucho7@gmail.com
Previously the typifier flagged all relational functions as producing a
scalar boolean but with the exception of `all` and `any`, according to
the wgsl spec, all other relational functions output a type the same
size as the input.https://gitlab.fi.muni.cz/xbela1/naga/-/commit/04b176ec6bd16929c45bd9db932ec11f86195c6e[glsl-in] Refractor overload selector and add comments2021-09-23T15:04:07-04:00João Capuchojcapucho7@gmail.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/160ab82feeba2d4c555543a998a3f022bde2dfcf[glsl-in] Allow array constructors2021-09-21T18:25:43-04:00João Capuchojcapucho7@gmail.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/70db5f681dd4f899d197b55a7d74f0f1923f9505[glsl-in] Allow use of constructors for user types2021-09-21T18:25:43-04:00João Capuchojcapucho7@gmail.comhttps://gitlab.fi.muni.cz/xbela1/naga/-/commit/d5fc05e8a4ea39aa91a4c9cc2da149eef5a03ba0Allow unsigned integers in switch2021-09-21T17:16:51-04:00João Capuchojcapucho7@gmail.com