- Aug 30, 2021
-
-
Jim Blandy authored
Change `write_type_declaration_local` to handle any type that can be represented as a `LocalType`. This means that Image and Sampler types are handled there now. Change `write_type_declaration_arena` to defer to `write_type_declaration_local` to handle any type that can be represented as a `LocalType`. This makes the code for those types in `write_type_declaration_arena` redundant, so remove it. However, continue to request SPIR-V capabilities for image types from `write_type_declaration_arena`, since that function is fallible, while `write_type_declaration_local` is not.
-
Jim Blandy authored
-
Jim Blandy authored
-
Igor Shaposhnik authored
-
- Aug 28, 2021
-
-
Jim Blandy authored
Fixes #1030. Fixes #1017.
-
- Aug 27, 2021
-
-
Jim Blandy authored
-
Jim Blandy authored
-
Jim Blandy authored
-
Jim Blandy authored
-
Jim Blandy authored
When we are leaning on robust buffer access to do the job for us, there's no undefined behavior going on. So `UndefinedBehavior` suggests people are doing something reckless even if they're not. The policy just says what Naga is doing, and it shouldn't pretend to say what the rest of the system is doing.
-
- Aug 26, 2021
-
-
Dzmitry Malyshau authored
-
- Aug 25, 2021
-
-
Dzmitry Malyshau authored
-
Hans Christian Schmitz authored
Set naga features in `fuzz/Cargo.toml` to those required for SPIR-V and WGSL input. Also bump libfuzzer-sys version.
-
- Aug 24, 2021
-
-
fsh authored
-
aentity authored
-
Hans Christian Schmitz authored
* Implement lexing for all WGSL number literal types * Move number literal test cases * Adjust tests to match WGSL spec on number literals Suffixes are not type names and currently only a plain `u` is supported for uints. More specifically, `i` and `f` suffixes or suffixes with widths in bits like `u32` are not supported at the moment. * Add more tests for invalid number literal suffixes * Replace code too new for Rust 1.43 * Implement parsing for hexadecimal integers * Switch to enum number types, and Bytes for width * Check for negative and leading zeros in int literals * Implement parsing of hex floats with hexf-parse * Update error message tests * Update snapshot test output files * Clean up lexer state machine code * Clean up unexpected token error code * Move number literal parsing to own submodule
-
- Aug 23, 2021
-
-
Jim Blandy authored
-
Jim Blandy authored
-
Jim Blandy authored
Using 1D images should require either the `Sampled1D` or `Image1D` capability. Using cube array images should require either the `SampledCubeArray` or `ImageCubeArray` capability.
-
Dzmitry Malyshau authored
-
Jim Blandy authored
-
Jim Blandy authored
Introduce a helper type that manages the details of emitting SPIR-V conditionals, tracking labels, branches, merge annotations and phi nodes. Change index bounds checks to use this helper.
-
Jim Blandy authored
For ease of review, there should be no meaningful code changes in this commit. Match arms are merely moved out into their own functions, whose arguments are the enum variant's fields, along with any free variables from the function containing the match.
-
Jim Blandy authored
-
Jim Blandy authored
-
Jim Blandy authored
-
João Capucho authored
Fixes #1266
-
Dzmitry Malyshau authored
* [hlsl-out] flatten the entry point inputs Previously, the logic was re-ordering the inputs according to the binding. This breaks if one of the inputs is a struct. With this change, the struct fields are also flattened into the fake entry point struct. We also construct the original arguments at the beginning of the function. * hlsl-out: completely separate the flattened IO structs from the original IR structs Previously, we had heuristics to detect if a particular struct needs the fields to be re-ordered. We'd re-order interface structs without layout, and the detection was very fragile and easily wrong. The new logic is spawning separate struct types if we need any re-ordering to happen. It's solid, there are no heuristics.
-
Jim Blandy authored
-
Igor Shaposhnik authored
* [hlsl-out] Implement switch statement * [hlsl-out] Implement switch statement * Add switch tests to control-flow snapshot
-
João Capucho authored
-
Mikko Lehtonen authored
-
Connor Fitzgerald authored
-
- Aug 21, 2021
-
-
Dzmitry Malyshau authored
-
João Capucho authored
Fixes #1246
-
João Capucho authored
-
Jim Blandy authored
Remove `forbidden_caps`. Accumulate capabilities actually used separately from the permitted capabilities, so that the latter can be retained across Writer resets, while the former is cleared between modules.
-
- Aug 20, 2021
-
-
Zicklag authored
-
João Capucho authored
-
João Capucho authored
Hlsl and wgsl don't support them directly so a polyfill is used taken from the msl spec. `asinh` = `log(x + sqrt(x * x + 1.0))` `acosh` = `log(x + sqrt(x * x - 1.0))` `atanh` = `0.5 * log((1.0 + x) / (1.0 – x))`
-