Commit Graph
545 Commits
Author SHA1 Message Date
teoxoy 4ede83929c [valid] make sure overrides are not present after evaluation 2024-04-05 18:07:41 +02:00
teoxoy f1706b994b [valid] error on non fully evaluated const-expressions 2024-04-05 18:07:41 +02:00
teoxoy e9eb703941 rename const_expressions to global_expressions 2024-04-05 18:07:41 +02:00
teoxoy fa5406fbb9 rename ExpressionConstnessTracker to ExpressionKindTracker 2024-04-05 18:07:41 +02:00
teoxoy d6ebd88f42 implement override-expression evaluation for initializers of override declarations 2024-04-05 18:07:41 +02:00
teoxoy ff332afdef [const-eval] fix evaluation of bool constuctors 2024-04-05 18:07:41 +02:00
teoxoy a946a6f0ad [const-eval] refactor logic around try_eval_and_append 2024-04-05 18:07:41 +02:00
teoxoy d7cfe16b79 validate that override ids are unique 2024-04-05 18:07:41 +02:00
teoxoy 2929ec333c [spv/msl/hlsl-out] support pipeline constant value replacements 2024-04-05 18:07:41 +02:00
teoxoy 7ce422c57a remove naga's clone feature 2024-04-05 18:07:41 +02:00
Teodor TanasoaiaandJim Blandy f949ea69c4 [wgsl-in] add support for override declarations (#4793)
Co-authored-by: Jim Blandy <jimb@red-bean.com>
2024-04-05 18:07:41 +02:00
Jim Blandy b3dfc40c9d [naga] Delete Constant::override and Override. 2024-04-05 18:07:41 +02:00
teoxoy 3bda381812 add pipeline constants plumbing 2024-04-05 18:07:41 +02:00
Erich Gubler fb305b85f6 docs: add warning about stack size for WGSL compilation 2024-04-03 15:54:43 -04:00
Erich Gubler b21a3265de fix(wgsl-in)!: limit brace recursion 2024-04-03 15:54:43 -04:00
Erich Gubler d4b673c88a refactor(wgsl-in): remove unnecessary return Ok(()) 2024-04-03 15:54:43 -04:00
Dzmitry Malyshau 3a467ad93d spv-out: Support arrayLength of a dynamically indexed bindings array 2024-04-02 19:22:34 +02:00
Dzmitry Malyshau bfe0b90740 spv-out: implement OpArrayLength on array buffer bindings 2024-04-02 19:22:34 +02:00
Christian Legnitto 1fd47b54ab Expose all items in naga::back.
This helps out-of-tree backends.

Fixes https://github.com/gfx-rs/wgpu/issues/5398.
2024-04-02 17:14:13 +02:00
Vecvec 1ead28701d Fix unused acceleration structures causing invalid SPIR-V (#5463) 2024-04-02 11:06:28 +00:00
Christian Legnitto 0f4839c466 Include the glsl global name in entrypoint arguments. (#5418) 2024-03-28 18:19:51 +01:00
Jim Blandy c613fbbeed [naga] Add some documentation for the uniformity analysis.
This is Naga's classic, over-conservative, non-standard-compliant
uniformity analysis. But it's still good to know what the heck it's
doing.
2024-03-28 17:36:58 +01:00
stefnotch 6a5418b93f Fix 5385 by updating the documentation (#5386)
* Fix 5385 by updating the documentation

* Update changelog
2024-03-13 21:30:50 -04:00
veroandConnor Fitzgerald 4e6f873da5 Add shader I64 and U64 support (#5154)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-03-12 12:34:06 +01:00
Teodor Tanasoaia 3107f5e148 [mtl-out] Add "assert" to reserved words 2024-03-12 10:52:37 +01:00
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
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]andConnor Fitzgerald 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 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 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 FitzgeraldandAndreas Reich 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