Commit Graph
1522 Commits
Author SHA1 Message Date
Dzmitry Malyshau 301e9c3763 Release 0.8.4 2022-01-24 11:08:26 -05:00
Connor Fitzgerald 9fe52dbfbc glsl: floatBitsToUint spelling 2022-01-24 11:08:26 -05:00
Dzmitry Malyshau a707e9f9c0 msl: add invariance if supported 2022-01-24 11:08:26 -05:00
francesco-cattoglio f42b88f8c6 glsl-out: Call proper memory barrier functions (#1680)
* glsl-out: Call proper memory barrier functions

* glsl-out: Change test for control flow

* Removed two unnecessary calls
2022-01-24 11:08:26 -05:00
Dzmitry Malyshau a3b1c13151 Release 0.8.3 2022-01-20 19:58:29 -05:00
Dzmitry Malyshau 26aff14bd6 Formatting and clippy fixes 2022-01-20 19:58:29 -05:00
Dzmitry Malyshau 35905fd69e msl: inject point size if needed 2022-01-20 19:58:29 -05:00
João Capucho 91bd26eb2c glsl-out: Write correct argument name when skipping samplers 2022-01-20 19:58:29 -05:00
Benoît du Garreau 70599c46f6 Don't pin indexmap version 2022-01-20 19:58:29 -05:00
Dzmitry Malyshau ffa11ba909 Release 0.8.2 2022-01-11 22:52:02 -05:00
Igor Shaposhnik 0fe7306ab7 [wgsl-in] Write a real type in type mismatch error 2022-01-11 22:52:02 -05:00
João Capucho bd0e600e4b spv-out: use OpFRem instead of OpFMod 2022-01-11 22:52:02 -05:00
João Capucho 2109c35bd5 spv-in: sign agnostic unary operations 2022-01-11 22:52:02 -05:00
João Capucho ec64092b12 spv-in: more sign agnostic binary operations 2022-01-11 22:52:02 -05:00
João Capucho 03f0e5c437 spv-in: OpVectorInsertDynamic allow unsigned index 2022-01-11 22:52:02 -05:00
Jim Blandy f63f21acc4 [msl-out] Don't give level in texture1d accesses.
Fixes #1642.

Since 1d textures cannot have mipmaps, MSL requires that the `level` argument to
texel accesses and dimension queries be a constexpr 0. For our purposes, just
omit the level argument altogether.
2022-01-11 22:52:02 -05:00
Dzmitry Malyshau df6ce9aa9c Validate structure resource types 2022-01-11 22:52:02 -05:00
Vinh Truong 5c3bee6959 Fix data packing functions on MSL (#1637)
* Fix data packing functions on MSL

`snorm` and `unorm` got mixed up.

* Fix bits.msl
2022-01-11 22:52:02 -05:00
Dzmitry Malyshau 5f3cf0e17c Bump naga-cli to 0.8.0 2022-01-11 22:52:02 -05:00
Dzmitry Malyshau 894530e5b4 Bump version to 0.8.1 2021-12-29 10:07:08 -05:00
Dzmitry Malyshau 845354d90b msl: fix packed vec access (#1634) 2021-12-29 10:07:08 -05:00
Dzmitry Malyshau 7fb21f7b99 msl: fix packed float support (#1630) 2021-12-29 10:07:08 -05:00
Dzmitry Malyshau 3340ab06f5 hlsl: support arrays of matrices (#1629) 2021-12-29 10:07:08 -05:00
Igor Shaposhnik b5801114a6 [glsl-out] Add stage postfix to generated global name (#1616) 2021-12-29 10:07:08 -05:00
Jay Oster 789aa16c3b Fixes for fma function (#1580)
* [hlsl-out] Write `mad` intrinsic for `fma` function

- This should be enough because we only support f32 for now.
- Adds a new test for WGSL functions, in the spirit of operators.wgsl.
- Closes #1579

* Add FMA feature to glsl backend

- I think this is right. Just iterate all known expressions in all
  functions and entry points to locate any `fma` function call.
  Should not need to walk the statement DAG.

* Transform GLSL fma function into an airthmetic expression when necessary

* Add tests for GLSL fma function tranformation

* Remove the hazard comment from the webgl test input

* Add helper method for fma function support checks

* Address review comment
2021-12-29 10:07:08 -05:00
Jakob Hellermann 132e247b80 impl Clone for WithSpan<E> (#1620) 2021-12-29 10:07:08 -05:00
Dzmitry Malyshau c2328fea75 Release v0.8 2021-12-18 12:05:12 -05:00
Dzmitry Malyshau 8caa2bd87e Gather operations 2021-12-18 11:46:49 -05:00
Jim Blandy db98743a5a [glsl-out] Don't return early from snapshot tests. 2021-12-17 20:27:27 -05:00
Ashley 75ce45d4f3 spv-in: fix support for degrees and radians conversion 2021-12-17 11:56:47 -05:00
Christofer Nolander d13e9e3b83 wgsl-in: correctly parse else if (#1611)
* wgsl-in: correctly parse `else if`

* wgsl-in: use early exit in `else if` parsing
2021-12-17 16:19:38 +00:00
João Capucho e1552fd9d5 wgsl-in: Implement matrix construction from scalar 2021-12-17 10:39:31 -05:00
João Capucho 33c1daecee glsl-in: Cull the body of do while if needed 2021-12-16 18:42:59 -05:00
João Capucho 322be0772e spv-in: Implement CompositeInsert for arrays
Only adds support for unspecialized arrays
2021-12-16 16:31:51 -05:00
Dzmitry Malyshau 6df9656e96 spv-out: Force wrapping of push constant structs 2021-12-16 16:21:06 -05:00
Dzmitry Malyshau 7bb886bf36 Enforce casting width better, fix IEqual/INotEqual in spv 2021-12-16 16:14:56 -05:00
João Capucho 12baa1e909 spv-in: Implement OpCopyObject
Treat it as a noop since the IR has no concept of copying objects
2021-12-16 13:11:20 -05:00
João Capucho 2a8d64fc59 spv-in: Implement remaining sign agnostic ops 2021-12-16 11:22:16 -05:00
João Capucho cf0c31cc85 spv-in: Allow branch weights in OpBranchConditional 2021-12-16 10:58:27 -05:00
João Capucho 9c75f3cdce glsl-in: Flatten entry point arguments
The IR doesn't allow having structs has bindings for entry point
input/output, so the glsl frontend must flatten them.

Glsl defines that the locations are sequential from the block base location.
2021-12-16 10:55:06 -05:00
João Capucho 049b48b319 spv-in: Remove if when both branches are equal 2021-12-15 23:55:20 -05:00
João Capucho 4334f0e6a9 Support bitwise And on booleans 2021-12-15 23:53:23 -05:00
João Capucho c64d5eff50 Support bitwise Or on booleans 2021-12-15 23:53:23 -05:00
Dzmitry Malyshau 8ffd6ba929 Remove top_level property of structs 2021-12-15 09:33:33 -05:00
Jim Blandy 3867ef4f6c [msl-out] Correctly construct out-of-bounds values for all types. 2021-12-14 23:00:03 -05:00
Jim Blandy 8a2fbd360d [msl-out] Add log tracing for functions and entry points. 2021-12-14 23:00:03 -05:00
Markus c4b331acb4 readme: list supported GLSL versions for glsl-in (#1586) 2021-12-11 21:29:49 -05:00
Lain-dono e200e44ede [spv-out] Fixing incorrect pack/unpack (#1587)
* [spv-out] Fixing incorrect pack/unpack

* [spv-out] Fixing incorrect pack/unpack: make tests happy

* [spv-out] Fixing incorrect pack/unpack: remove unexpected newline
2021-12-11 21:29:31 -05:00
Jim Blandy f51f468a47 [msl-out] Implement index bounds check policies for non-texture accesses. 2021-12-06 15:53:41 -05:00
Jim Blandy e8f564dc83 [spv-out] Add comment about AccessIndex on non-pointer values. 2021-12-06 15:53:41 -05:00