Commit Graph

2045 Commits

Author SHA1 Message Date
Fredrik Fornwall
dcce91960a
[glsl-out] Add built-in functions to keywords (#2410)
* [glsl-out] Add built-in functions to keywords

Fixes #2276 and part of #2366.

* add a few more keywords and document where they come from

---------

Co-authored-by: teoxoy <28601907+teoxoy@users.noreply.github.com>
2023-07-25 16:47:32 +02:00
Evan Mark Hopkins
5f8e4f6dea
[spv] Fix OpImageQueries to allow Uints (#2404) 2023-07-24 21:25:45 +02:00
Connor Fitzgerald
bac2d82a43 Bump naga versions 2023-07-20 22:20:46 -04:00
Connor Fitzgerald
c67fcc24bb Bump dependencies 2023-07-20 22:20:46 -04:00
Jim Blandy
409239c0e2 [glsl-out] Various doc fixes. 2023-07-17 16:26:08 -07:00
Jim Blandy
e7cd4ffbaa [wgsl-in] Document ExpressionContextType, ExpressionContext. 2023-07-17 16:26:08 -07:00
Jim Blandy
63bc66bc70 Reject constant/initializer cycles in handle validation. 2023-07-17 16:26:08 -07:00
Jim Blandy
a3dff6b840 Document front::wgsl::lower::ExpressionContextType and friends. 2023-07-17 16:26:08 -07:00
Jim Blandy
c7490b9832 Document constant and override expressions. 2023-07-17 16:26:08 -07:00
teoxoy
ee81f569df add constructors test file 2023-07-17 16:26:08 -07:00
teoxoy
d348d843e1 implement const-expressions (phase 1) 2023-07-17 16:26:08 -07:00
Fredrik Fornwall
dfd88ee485
[glsl-in] Support commas in structure definitions (#2400) 2023-07-17 16:22:25 +01:00
Fredrik Fornwall
04ef22f6dc
Update README after the make -> xtask transition (#2401) 2023-07-08 12:37:41 +02:00
Fredrik Fornwall
981c1f9196
Fix installing naga-cli from git (#2398)
Move hl-snapshots out from the xtask workspace, since it's also used as
a dev dependency in the naga crate itself for a test.
2023-07-08 01:33:48 +02:00
Nicolas Silva
7624d6c78e
[glsl-out] textureSize level must be a signed integer. (#2397) 2023-07-04 15:53:29 +02:00
Teodor Tanasoaia
a550b0b499
Split image bounds check policy (#2265) 2023-06-29 14:59:37 +00:00
wicast
3ca8b4997d
fix(spv-out-debug): fix debug options (#2394) 2023-06-29 13:31:26 +02:00
wicast
25e4f17a69
add debug info for spv-out (#2379) 2023-06-28 14:30:25 +02:00
Joe O'Connor
614da63366
Expose early depth test field (#2393) 2023-06-27 15:25:55 +02:00
Elabajaba
adf1cca68d
Implement Pack/Unpack for HLSL (#2353) 2023-06-23 15:52:22 +02:00
Teodor Tanasoaia
ffe2308a60
rename allow_point_size to allow_and_force_point_size (#2280) 2023-06-22 06:36:54 -07:00
Eduard-Mihai Burtescu
f915d39a87 [spv-out] Use IndexSet instead of HashSet for iterated sets (capabilities/extensions). 2023-06-21 13:30:01 -07:00
Igor Shaposhnik
f31093fb3b Add array-in-function-return-type test 2023-06-15 14:53:19 +02:00
Igor Shaposhnik
304ba5805c [glsl-out] Fix functions with array return type 2023-06-15 14:53:19 +02:00
Jim Blandy
b7da0057a0
Don't use std::opsIndex, used only when "validate" is on. (#2383)
In `src/valid/expresion.rs`, use the full path `std::ops::Index` when
implementing the trait on `ExpressionTypeResolver`. This
implementation is `#[cfg(feature = "validate")]`, so the `use`
directive becomes unnecessary when that feature is not enabled,
triggering warnings.
2023-06-15 14:40:13 +02:00
teoxoy
76003dc003 remove unnecessary macro parameters 2023-06-13 15:08:05 -07:00
teoxoy
08105461ce omit non referenced expressions 2023-06-12 17:49:06 -07:00
teoxoy
763ec5d1a5 complete HLSL reserved symbols 2023-06-12 17:41:53 -07:00
teoxoy
dbb6d8e814 avoid allocating 2023-06-12 17:41:53 -07:00
Erich Gubler
9b6e74813f build: mark hlsl-snapshots as publish = false 2023-06-09 14:32:02 +02:00
Erich Gubler
3e11b4a3cd refactor(xtask): prefer ? to Result::map in subcmd. parsing 2023-06-09 14:32:02 +02:00
Erich Gubler
cd7b8aca47 refactor(xtask): avoid unnecessary IIFE 2023-06-09 14:32:02 +02:00
Erich Gubler
273ff5d829 style: alphabetize dev-dependencies 2023-06-08 16:56:57 +02:00
Erich Gubler
daeb64c429 build(ci): trigger for ron files in HLSL shader snapshot test config. 2023-06-08 16:56:57 +02:00
Erich Gubler
91d48b2923 build: move from make to cargo xtask workflows
Re-implement `naga` development workflows using [`cargo xtask`]. Convert
`make` logic and shader test configuration as file with Bash variables
into an `xtask` crate and YAML files, respectively.

Pros:

* We now have a _portable_ workflow everywhere, which means Windows
  folks and people who don't install `make` don't have to suffer.
  😮‍💨
* Workflow logic is now relatively easy to inspect and change. Whew!
  💁🏻‍♂️💦
* Contributors can use their existing Rust knowledge to contribute to
  developer experience. 🎉
* `cargo xtask` is a relatively well-known convention for workflows in
  the ecosystem.
* We can do fancy things like allow folks to run at different log levels
  for workflows, depending on their tastes.

Cons:

* There's now a non-trivial compile step to project workflow.
  Incremental rebuilds seem to be pretty short, though!
* Code is much more verbose than the (very) terse `make` implementation.

[`cargo xtask`]: https://github.com/matklad/cargo-xtask
2023-06-08 16:56:57 +02:00
Jim Blandy
e8a7e50f0f
Makefile: validate-spv: update spirv-as and spirv-val invocations. (#2374)
Newer versions of these programs require `-` as a filename argument to
read from standard input.
2023-06-06 17:02:10 +02:00
daxpedda
b7f4006e46
Bump bitflags to v2 (#2358) 2023-06-01 15:40:47 +02:00
Pieter-Jan Briers
544ccf88da
Handle case insensitive FXC HLSL keywords. (#2347)
There are a few keywords like "pass" in HLSL that are actually case-insensitive for FXC. This can be disabled with strict mode, but even if you do that FXC will continue to give an error if you try to use them in identifiers (at all, with any casing).

This changes the namer code to escape these keywords even if the casing is different.

If you're wondering where I got the list from: I looked at the list of strings in D3DCompiler_47.dll.
2023-05-31 15:00:23 +02:00
Teodor Tanasoaia
5206c59509
update snapshots (#2363) 2023-05-30 14:03:10 +02:00
Daniel McNab
907b7c7cda
Workgroup uniform load (#2201)
Implement the WGSL `workgroupUniformLoad` function.
2023-05-26 13:32:22 -07:00
Shaye Garg
1c17fa82d4
[wgsl-in] Error on param redefinition (#2342)
* error on param redefinition

* also fix #2312
2023-05-25 13:13:27 +02:00
Jim Blandy
baed251cb1
Document which expressions are in scope for a break_if expression. (#2326) 2023-05-25 13:08:24 +02:00
Jim Blandy
201c0e2999
[spv-in] Improve documentation for SPIR-V control flow parsing. (#2324) 2023-05-25 13:06:21 +02:00
Erich Gubler
4b41e07a99
refactor: add several clippy lints (#2296) 2023-05-24 17:23:24 +02:00
Ashley
ce48588d74
[front/spir-v] Obey the is_depth field of OpTypeImage (#2341)
* [front/spir-v] Obey the is_depth field of OpTypeImage

* Add changed tests
2023-05-22 09:35:58 -07:00
Eduard-Mihai Burtescu
423a069dcd [spv-in] Convert conditional backedges to break if. 2023-05-12 13:59:08 -07:00
Teodor Tanasoaia
62b287e761
Change type of constant sized arrays to NonZeroU32 (#2337) 2023-05-12 14:38:50 +02:00
teoxoy
405413452d Correct type of index and flush the emitter 2023-05-11 12:57:28 -07:00
teoxoy
d842d6688d Introduce GlobalCtx 2023-05-11 09:52:40 -07:00
Jim Blandy
d763fb31e2 [spv-in] Generate Expression::Literal in some limited cases. 2023-05-11 07:09:53 -07:00