Jim Blandy
14dbf8c60e
[naga] Document the absence of "phi" expressions.
2024-03-07 12:46:25 +01:00
Jim Blandy
8ee3c414f0
[naga] Document return types of image query operations.
2024-03-07 12:45:22 +01:00
Erik Zivkovic
d417433e0c
Naga: GLSL 410 does not support layout(binding = ...)
...
Naga assumed that GLSL 410 supported layout(binding = ...) but it does not,
it only supports layout(location = ...). It is not possible to enable only
layout(location = ...) currently, so we need to predicate the feature on GLSL
420 instead.
2024-03-07 12:28:26 +01:00
Jim Blandy
ffaabeb921
[naga xtask] Update Cargo.lock for dependabot #5241 .
...
The dependabot PR #5241 made `naga/hlsl-snapshots` depend on nanoserde 0.1.37,
but didn't regenerate `naga/xtask/Cargo.lock`.
2024-03-07 12:14:02 +01:00
Connor Fitzgerald
a5c0181c3a
Bitfield Fixes ( #5305 )
2024-02-29 20:50:42 +00:00
Jim Blandy
b020b984df
[naga] Fix docs generated by gen_component_wise_extractor
. ( #5314 )
2024-02-29 15:39:27 -05:00
Connor Fitzgerald
8129897ccb
Nested loop test
2024-02-28 13:54:27 +01:00
dependabot[bot]
744454b9e2
Bump Many Dependencies and MSRV ( #5241 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-02-27 14:43:05 -05:00
Connor Fitzgerald
38419a9cf2
Fix Integer Clamp ( #5300 )
...
* Fix Integer Clamp
* Changelog
2024-02-26 20:28:23 +01:00
JMS55
5b9ade8223
Add AccelerationStructure to WGSL write_value_type ( #5261 )
2024-02-24 02:41:37 -05:00
Imbris
abc0b30dfc
Add test case for builtin only accessed in function parsed after the entry point function
2024-02-15 18:12:25 +01:00
Imbris
8b818a2076
Defer entry-point processing so that all potential uses of builtin's are found before culling the unused ones
2024-02-15 18:12:25 +01:00
Imbris
6223af3860
Extract entry point processing from parse_function into an independent function.
2024-02-15 18:12:25 +01:00
Imbris
ae22743326
Add test case to naga/spv-in for an unnamed glPerVertex struct
2024-02-15 18:12:25 +01:00
Imbris
4554f852c1
[spv-in] Remove providing "perVertexStruct" for certain unnamed inputs
...
since we probably shouldn't be naming things if they don't have a name
in the input.
As requested here: https://github.com/gfx-rs/wgpu/pull/5227#issuecomment-1936027091
2024-02-15 18:12:25 +01:00
Imbris
b704132b4c
Remove unnecessary "gl_PerVertex" name check so unused builtins will be
...
handled even when this name is not in the input SPIRV.
2024-02-15 18:12:25 +01:00
Christian Schwarz
2382c8e74f
Fix glsl backend errors regarding samplerCubeArrayShadow ( #5171 )
...
* add GL_EXT_texture_shadow_lod feature detection
* allow more cases of cube depth texture sampling in glsl
* add test for sampling a cubemap array depth texture with lod
* add test for chosing GL_EXT_texture_shadow_lod over the grad workaround if instructed
* add changelog entry for GL_EXT_texture_shadow_lod
* fix criteria for requiring and using TEXTURE_SHADOW_LOD
* require gles 320 for textureSampling over cubeArrayShadow
* prevent false positives in TEXTURE_SHADOW_LOD in checks
* make workaround_lod_with_grad usecase selection less context dependant
* move 3d array texture error into the validator
* correct ImageSample logic errors
2024-02-08 18:27:58 +01:00
Connor Fitzgerald
faed98b45c
Add typos
to Repository CI ( #5191 )
...
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-02-05 12:30:29 -05:00
Erich Gubler
443d5f93dc
style(const_eval): match variant decl. order of current MathFunction
impls.
2024-01-30 10:53:03 +01:00
Erich Gubler
c559be933b
feat(const_eval): impl. min
2024-01-30 10:53:03 +01:00
Erich Gubler
abcc6ddff3
feat(const_eval): impl. max
2024-01-30 10:53:03 +01:00
Erich Gubler
18f50092a6
feat(const_eval): impl. trunc
2024-01-30 10:53:03 +01:00
Erich Gubler
2d3005b745
feat(const_eval): impl. sign
with new component_wise_signed
2024-01-30 10:53:03 +01:00
Erich Gubler
0bd5f77601
feat(const_eval): impl. reverseBits
2024-01-30 10:53:03 +01:00
Erich Gubler
7dedd002c0
feat(const_eval): impl. radians
2024-01-30 10:53:03 +01:00
Erich Gubler
e6f6eb7036
feat(const_eval): impl. log2
2024-01-30 10:53:03 +01:00
Erich Gubler
39cb92cf88
feat(const_eval): impl. log
2024-01-30 10:53:03 +01:00
Erich Gubler
4db02d1962
feat(const_eval): impl. fract
2024-01-30 10:53:03 +01:00
Erich Gubler
fc04518750
feat(const_eval): impl. inverseSqrt
2024-01-30 10:53:03 +01:00
Erich Gubler
19f5e4d5e4
feat(const_eval): impl. fma
2024-01-30 10:53:03 +01:00
Erich Gubler
7b274fc161
feat(const_eval): impl. exp2
2024-01-30 10:53:03 +01:00
Erich Gubler
0f8adae123
feat(const_eval): impl. degrees
2024-01-30 10:53:03 +01:00
Erich Gubler
01d02caca3
feat(const_eval): impl. exp
2024-01-30 10:53:03 +01:00
Erich Gubler
66fd1872ab
feat(const_eval): impl. countTrailingZeros
2024-01-30 10:53:03 +01:00
Erich Gubler
2ccc4f49ee
feat(const_eval): impl. countOneBits
2024-01-30 10:53:03 +01:00
Erich Gubler
ea044f039c
feat(const_eval): impl. countLeadingZeros
with new component_wise_concrete_int
2024-01-30 10:53:03 +01:00
Erich Gubler
7f70df0c47
feat(const_eval): impl. floor
2024-01-30 10:53:03 +01:00
Erich Gubler
a05cc37e3c
feat(const_eval): impl. ceil
2024-01-30 10:53:03 +01:00
wayne
c4b5cc94ad
don't panic if naga parsing of shader source fails ( #5034 )
...
* naga: glsl parser should return singular ParseError similar to wgsl
* wgpu: treat glsl the same as wgsl when creating ShaderModule
* naga: update glsl parser tests to use new ParseError type
* naga: glsl ParseError errors field should be public
* wgpu-core: add 'glsl' feature
* fix some minor bugs in glsl parse error refactor
* naga/wgpu/wgpu-core: improve spirv parse error handling
* wgpu-core: feature gate use of glsl and spv naga modules
* wgpu: enable wgpu-core glsl and spirv features when appropriate
* obey clippy
* naga: derive Clone in Type
* naga: don't feature gate Clone derivation for Type
* obey cargo fmt
* wgpu-core: use bytemuck instead of zerocopy
* wgpu-core: apply suggested edit
* wgpu-core: no need to borrow spirv code
* Update wgpu/src/backend/wgpu_core.rs
Co-authored-by: Alphyr <47725341+a1phyr@users.noreply.github.com>
---------
Co-authored-by: Alphyr <47725341+a1phyr@users.noreply.github.com>
2024-01-23 10:25:25 -05:00
Erich Gubler
2ee7604307
fix(const_eval): use component count, not arg. count, for component-wise iter.
2024-01-22 10:31:53 +01:00
dependabot[bot]
a0862aabb4
build(deps): bump the patch-updates group with 16 updates ( #5115 )
...
Bumps the patch-updates group with 16 updates:
| Package | From | To |
| --- | --- | --- |
| [bitflags](https://github.com/bitflags/bitflags ) | `2.4.1` | `2.4.2` |
| [env_logger](https://github.com/rust-cli/env_logger ) | `0.10.1` | `0.10.2` |
| [smallvec](https://github.com/servo/rust-smallvec ) | `1.12.0` | `1.13.1` |
| [winit](https://github.com/rust-windowing/winit ) | `0.29.9` | `0.29.10` |
| [anstream](https://github.com/rust-cli/anstyle ) | `0.6.7` | `0.6.11` |
| [clap](https://github.com/clap-rs/clap ) | `4.4.16` | `4.4.18` |
| [fdeflate](https://github.com/image-rs/fdeflate ) | `0.3.3` | `0.3.4` |
| [hermit-abi](https://github.com/hermitcore/hermit-rs ) | `0.3.3` | `0.3.4` |
| [linux-raw-sys](https://github.com/sunfishcode/linux-raw-sys ) | `0.4.12` | `0.4.13` |
| [pkg-config](https://github.com/rust-lang/pkg-config-rs ) | `0.3.28` | `0.3.29` |
| [proc-macro2](https://github.com/dtolnay/proc-macro2 ) | `1.0.76` | `1.0.78` |
| [rayon](https://github.com/rayon-rs/rayon ) | `1.8.0` | `1.8.1` |
| [regex](https://github.com/rust-lang/regex ) | `1.10.2` | `1.10.3` |
| [smol_str](https://github.com/rust-analyzer/smol_str ) | `0.2.0` | `0.2.1` |
| [unicode-bidi](https://github.com/servo/unicode-bidi ) | `0.3.14` | `0.3.15` |
| [uuid](https://github.com/uuid-rs/uuid ) | `1.6.1` | `1.7.0` |
Updates `bitflags` from 2.4.1 to 2.4.2
- [Release notes](https://github.com/bitflags/bitflags/releases )
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md )
- [Commits](https://github.com/bitflags/bitflags/compare/2.4.1...2.4.2 )
Updates `env_logger` from 0.10.1 to 0.10.2
- [Release notes](https://github.com/rust-cli/env_logger/releases )
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.10.1...v0.10.2 )
Updates `smallvec` from 1.12.0 to 1.13.1
- [Release notes](https://github.com/servo/rust-smallvec/releases )
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.12.0...v1.13.1 )
Updates `winit` from 0.29.9 to 0.29.10
- [Release notes](https://github.com/rust-windowing/winit/releases )
- [Changelog](https://github.com/rust-windowing/winit/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-windowing/winit/compare/v0.29.9...v0.29.10 )
Updates `anstream` from 0.6.7 to 0.6.11
- [Commits](https://github.com/rust-cli/anstyle/compare/anstream-v0.6.7...anstream-v0.6.11 )
Updates `clap` from 4.4.16 to 4.4.18
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v4.4.16...v4.4.18 )
Updates `fdeflate` from 0.3.3 to 0.3.4
- [Changelog](https://github.com/image-rs/fdeflate/blob/main/CHANGES.md )
- [Commits](https://github.com/image-rs/fdeflate/compare/v0.3.3...v0.3.4 )
Updates `hermit-abi` from 0.3.3 to 0.3.4
- [Release notes](https://github.com/hermitcore/hermit-rs/releases )
- [Commits](https://github.com/hermitcore/hermit-rs/compare/hermit-abi-0.3.3...hermit-abi-0.3.4 )
Updates `linux-raw-sys` from 0.4.12 to 0.4.13
- [Commits](https://github.com/sunfishcode/linux-raw-sys/compare/v0.4.12...v0.4.13 )
Updates `pkg-config` from 0.3.28 to 0.3.29
- [Changelog](https://github.com/rust-lang/pkg-config-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/pkg-config-rs/compare/0.3.28...0.3.29 )
Updates `proc-macro2` from 1.0.76 to 1.0.78
- [Release notes](https://github.com/dtolnay/proc-macro2/releases )
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.76...1.0.78 )
Updates `rayon` from 1.8.0 to 1.8.1
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md )
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.8.0...rayon-core-v1.8.1 )
Updates `regex` from 1.10.2 to 1.10.3
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.10.2...1.10.3 )
Updates `smol_str` from 0.2.0 to 0.2.1
- [Commits](https://github.com/rust-analyzer/smol_str/commits )
Updates `unicode-bidi` from 0.3.14 to 0.3.15
- [Release notes](https://github.com/servo/unicode-bidi/releases )
- [Commits](https://github.com/servo/unicode-bidi/commits )
Updates `uuid` from 1.6.1 to 1.7.0
- [Release notes](https://github.com/uuid-rs/uuid/releases )
- [Commits](https://github.com/uuid-rs/uuid/compare/1.6.1...1.7.0 )
---
updated-dependencies:
- dependency-name: bitflags
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: env_logger
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: smallvec
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: winit
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: anstream
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: clap
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: fdeflate
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: hermit-abi
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: linux-raw-sys
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: pkg-config
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: proc-macro2
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: rayon
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: regex
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: smol_str
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: unicode-bidi
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: uuid
dependency-type: indirect
update-type: version-update:semver-minor
dependency-group: patch-updates
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-22 01:00:32 -05:00
Erich Gubler
063e11027b
refactor(const_eval): inline math_pow
2024-01-18 16:57:46 -05:00
Erich Gubler
c2f110ed0c
feat(const_eval): impl. atanh
2024-01-18 16:57:46 -05:00
Erich Gubler
262c07f40c
feat(const_eval): impl. atan
2024-01-18 16:57:46 -05:00
Erich Gubler
f8113c55b7
feat(const_eval): impl. asinh
2024-01-18 16:57:46 -05:00
Erich Gubler
e2783c7d45
feat(const_eval): impl. asin
2024-01-18 16:57:46 -05:00
Erich Gubler
afb54d58ba
feat(const_eval): impl. acosh
2024-01-18 16:57:46 -05:00
Erich Gubler
6654c68950
feat(const_eval): impl. acos
2024-01-18 16:57:46 -05:00
Erich Gubler
12b11f870b
feat(const_eval): impl. cosh
2024-01-18 16:57:46 -05:00
Erich Gubler
7528b22e57
feat(const_eval): impl. cos
2024-01-18 16:57:46 -05:00
Erich Gubler
3ab9a80815
feat(const_eval): impl. tanh
2024-01-18 16:57:46 -05:00
Erich Gubler
bdf1cb4ec3
feat(const_eval): impl. tan
2024-01-18 16:57:46 -05:00
Erich Gubler
29a46234f4
feat(const_eval)!: reimpl. clamp
2024-01-18 16:57:46 -05:00
Erich Gubler
6f5b2a64e2
feat(const_eval): impl. step
2024-01-18 16:57:46 -05:00
Erich Gubler
f2dbdfcdc6
feat(const_eval): impl. sqrt
2024-01-18 16:57:46 -05:00
Erich Gubler
133b573133
feat(const_eval): impl. sinh
2024-01-18 16:57:46 -05:00
Erich Gubler
99a38c7b7c
feat(const_eval): impl. sin
2024-01-18 16:57:46 -05:00
Erich Gubler
5dc1038124
feat(const_eval): impl. saturate
2024-01-18 16:57:46 -05:00
Erich Gubler
87dafb645a
feat(const_eval): impl. round
2024-01-18 16:57:46 -05:00
Erich Gubler
fc27b08dca
feat(const_eval): impl. abs
with new component_wise_scalar
2024-01-18 16:57:46 -05:00
Erich Gubler
5c900f2568
refactor(const_eval): add component_wise_float
helper, reimpl. math_pow
2024-01-18 16:57:46 -05:00
Erich Gubler
c2058487ca
chore: run rustfmt
in naga
2024-01-18 16:57:46 -05:00
Connor Fitzgerald
7eac4cec5b
Fix naga release
2024-01-17 14:47:13 -05:00
Connor Fitzgerald
8b2098bd4e
Release 0.19 ( #5082 )
2024-01-17 14:42:11 -05:00
dependabot[bot]
8c1658f28f
Bump the patch-updates group with 11 updates ( #5039 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-10 19:38:11 -05:00
Jim Blandy
8af6975d5e
Prefer Arc::into_inner
over Arc::try_unwrap
. ( #5018 )
2024-01-08 19:24:33 -05:00
Patryk Wychowaniec
e7c7017d2e
[naga wgsl-in] Fix parsing break if
s
...
Closes https://github.com/gfx-rs/wgpu/issues/4982 .
2024-01-08 10:50:38 +01:00
dependabot[bot]
0005b42648
Bump serde from 1.0.194 to 1.0.195 ( #5005 )
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.194 to 1.0.195.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.194...v1.0.195 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-01-06 09:56:06 -05:00
Connor Fitzgerald
2f87a8ff83
Update Rollup
2024-01-05 10:27:27 +01:00
dependabot[bot]
cef6a0c0cf
Bump thiserror from 1.0.52 to 1.0.56 ( #4978 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-03 21:54:23 -05:00
dependabot[bot]
d03e2907d5
Bump serde from 1.0.193 to 1.0.194 ( #4965 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-03 14:43:34 -05:00
teoxoy
b47d4924a8
[glsl-in] fix swizzle in a global const context
2024-01-03 11:34:10 +01:00
dependabot[bot]
430fc0b3a8
Bump thiserror from 1.0.51 to 1.0.52 ( #4933 )
...
Bumps [thiserror](https://github.com/dtolnay/thiserror ) from 1.0.51 to 1.0.52.
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.51...1.0.52 )
---
updated-dependencies:
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-28 14:04:20 +01:00
Erich Gubler
e45a86fa7c
[naga xtask] Add and use ValidateSubcommand::all
.
...
Add an `all` method to `ValidateSubcommand`, so that we can just use
matches elsewhere, and let the compile catch missing or duplicated
cases for us.
2023-12-27 13:07:09 -08:00
Jim Blandy
71f18fd61a
[naga xtask] Use anyhow::ensure!
where appropriate.
2023-12-27 13:07:09 -08:00
Jim Blandy
3e252ac2f3
[naga xtask] Use log::error
in preference to eprintln
.
2023-12-27 13:07:09 -08:00
Jim Blandy
de3df51807
[naga xtask] Add validate all
subcommand.
2023-12-27 13:07:09 -08:00
Jim Blandy
403db446e4
[naga xtask] Run validation jobs in parallel, using jobserver.
2023-12-27 13:07:09 -08:00
Jim Blandy
85ab6327d3
[naga xtask] Use indicatif
crate to report validation progress.
2023-12-27 13:07:09 -08:00
Jim Blandy
a1a8b6d445
[naga xtask] Remove ack_visiting
function.
2023-12-27 13:07:09 -08:00
Jim Blandy
0d25acba68
[naga xtask] Collect validation jobs in a Vec before running them.
2023-12-27 13:07:09 -08:00
Jim Blandy
17a9166c26
[naga xtask] Produce output only when an error occurs.
2023-12-27 13:07:09 -08:00
Jim Blandy
41276a1731
[naga xtask] Break validation subcommands into functions.
2023-12-27 13:07:09 -08:00
Jim Blandy
9041bb94db
[naga xtask] Move validation subcommands into their own module.
2023-12-27 13:07:09 -08:00
Jim Blandy
9afd54ea24
[naga xtask] Use naga-cli's --bulk-validate option.
...
Use `naga --bulk-validate` for `cargo xtask validate wgsl`, reducing
runtime from 12s to 0.8s.
2023-12-24 12:03:28 -08:00
Connor Fitzgerald
090f2f757c
Use nightly for docs ( #4906 )
2023-12-20 18:59:22 -05:00
Nicolas Silva
625165e60e
Make the naga version in trunk as high as the latest published one. ( #4891 )
2023-12-18 04:05:16 -05:00
dependabot[bot]
790c40fd44
Bump thiserror from 1.0.50 to 1.0.51 ( #4890 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-17 22:10:40 -05:00
Jim Blandy
d9d051b7a5
[naga wgsl] Let unary operators accept and produce abstract types.
...
Fixes #4445 .
Fixes #4492 .
Fixes #4435 .
2023-12-14 10:54:46 +01:00
Jim Blandy
c4b43875e5
[naga wgsl-in] Support abstract operands to binary operators.
2023-12-13 08:42:26 -08:00
Jim Blandy
f2828ace38
[naga wgsl-in] Separate out convert_to_leaf_scalar
.
...
Abstract out the body of `convert_slice_to_common_leaf_scalar`'s main
loop into its own function. Code motion only, no intended change of
behavior.
2023-12-13 08:42:26 -08:00
Jim Blandy
0df496062e
[naga wgsl-in] Rename convert_slice_to_common_leaf_scalar
.
...
This is a mouthful, but it's going to align better with functions to
be introduced in later commits.
2023-12-13 08:42:26 -08:00
Jim Blandy
f4161189fa
[naga wgsl-in] Relax arg type for automatic_conversion_consensus
.
2023-12-13 08:42:26 -08:00
Jim Blandy
84c74adec2
[naga wgsl-in] Relocate automatic_conversion_consensus
.
...
Move `naga::front::wgsl::lower:🚧 :automatic_conversion_consensus`
into `conversion.rs`, and make it a method of `ExpressionContext`.
2023-12-13 08:42:26 -08:00
Jim Blandy
3ffd5a1e56
[naga wgsl-out] Include the f
suffix on f32
literals.
...
Without the suffix, `Expression::Literal(Literal::F32)` expressions
get written without any suffix on the number, meaning that they get
re-parsed as `AbstractFloat` values. In theory, this should always be
fine, but since we don't actually support abstract types yet in all
the places we should, having them appear in the output causes
validation problems.
See also: #4863 , which did the same for `i32` literals.
2023-12-13 13:42:05 +01:00
Jim Blandy
6dc9ccab85
[naga wgsl-out] Include the i
suffix on i32
literals. ( #4863 )
...
Without the suffix, `Expression::Literal(Literal::I32)` expressions
get written without any suffix on the decimal number, meaning that
they get re-parsed as AbstractInt values. In theory, this should
always be fine, but since we don't actually support abstract types yet
in all the places we should, having them appear in the output causes
validation problems.
2023-12-12 12:07:10 +00:00
Jim Blandy
4b6a2d1dfa
[naga] Teach the constant evaluator vector/vector operators.
...
Allow constant evaluation of binary operators whose left and right
operands are both vectors.
2023-12-12 12:48:10 +01:00
Jim Blandy
0e41cfe4ca
[naga] Change operators.wgsl to use values that matter.
...
Change `splat` to take run-time values as arguments, to prevent
constant evaluation from boiling everything away.
2023-12-12 12:48:10 +01:00
Jim Blandy
439bf3c1b4
[naga wgsl-in] Improve error message for failed concretization.
2023-12-12 12:48:10 +01:00
teoxoy
411c1e5b21
[spv-out] Decorate all non-uniform binding array access chains as NonUniform
, not just buffer binding arrays.
...
Apply the `NonUniform` decoration to the results of all access chains rooted in binding arrays that use non-uniform values as indices, regardless of the binding array's element type and address space. Previously, Naga only decorated non-uniform access chains for binding arrays of buffers.
2023-12-07 19:01:04 +01:00