-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement const-expressions (phase 2) #2309
Commits on Oct 12, 2023
-
[wgsl-in] eagerly evaluate const-expressions
[wgsl-in] support const-expressions in attributes allow `Splat` as an evaluated const-expression type
Configuration menu - View commit details
-
Copy full SHA for 92c30dc - Browse repository at this point
Copy the full SHA 92c30dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 345360e - Browse repository at this point
Copy the full SHA 345360eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f190b48 - Browse repository at this point
Copy the full SHA f190b48View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6bae046 - Browse repository at this point
Copy the full SHA 6bae046View commit details -
With the addition of the constant evaluator to the `proc` module, it is now concerned with constructing expressions. Any code that constructs expressions will generally also need to deal with `Emit` statements, which are handled by the `Emitter` type. However, `Emitter` is private to the `front` module. This patch moves it to `proc` and makes it accessible to both the constant evaluator and the front ends.
Configuration menu - View commit details
-
Copy full SHA for 6feb138 - Browse repository at this point
Copy the full SHA 6feb138View commit details -
Replace
ConstantEvaluator
's closure with optional emitter data.Instead of letting the user supply an arbitrary closure for appending expressions, instead give `ConstantEvaluator` an `Option` that holds an `Emitter` to interrupt, and a `block` to add any new `Emit` statements to.
Configuration menu - View commit details
-
Copy full SHA for 8fcadcb - Browse repository at this point
Copy the full SHA 8fcadcbView commit details -
Configuration menu - View commit details
-
Copy full SHA for a53de15 - Browse repository at this point
Copy the full SHA a53de15View commit details -
Configuration menu - View commit details
-
Copy full SHA for 908d74e - Browse repository at this point
Copy the full SHA 908d74eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 946c5f2 - Browse repository at this point
Copy the full SHA 946c5f2View commit details -
ConstantEvaluator::swizzle: Handle vector concatenation and indexing (#…
…2485) * ConstantEvaluator::swizzle: Handle vector concatenation, indexing. * Handle vector Compose expressions nested two deep. * Move `flatten_compose` to `proc`, and make it a free function. * [spv-out] Ensure that we flatten Compose for OpConstantCompose.
Configuration menu - View commit details
-
Copy full SHA for 2e5a244 - Browse repository at this point
Copy the full SHA 2e5a244View commit details -
Split
const-exprs.rs
test into separate functions.Also, just use a single out variable for each type. rather than introducing a new output variable for every test we add.
Configuration menu - View commit details
-
Copy full SHA for 938ce3d - Browse repository at this point
Copy the full SHA 938ce3dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 85b578a - Browse repository at this point
Copy the full SHA 85b578aView commit details -
Configuration menu - View commit details
-
Copy full SHA for a2a917c - Browse repository at this point
Copy the full SHA a2a917cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 170fd8c - Browse repository at this point
Copy the full SHA 170fd8cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b151a2a - Browse repository at this point
Copy the full SHA b151a2aView commit details -
Configuration menu - View commit details
-
Copy full SHA for f733ac1 - Browse repository at this point
Copy the full SHA f733ac1View commit details -
Configuration menu - View commit details
-
Copy full SHA for f72d5c1 - Browse repository at this point
Copy the full SHA f72d5c1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b4b0d3 - Browse repository at this point
Copy the full SHA 4b4b0d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d87d9e - Browse repository at this point
Copy the full SHA 9d87d9eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f06eee9 - Browse repository at this point
Copy the full SHA f06eee9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 303a3cd - Browse repository at this point
Copy the full SHA 303a3cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 82a3613 - Browse repository at this point
Copy the full SHA 82a3613View commit details -
Configuration menu - View commit details
-
Copy full SHA for b46ea49 - Browse repository at this point
Copy the full SHA b46ea49View commit details -
Configuration menu - View commit details
-
Copy full SHA for d87231b - Browse repository at this point
Copy the full SHA d87231bView commit details -
Configuration menu - View commit details
-
Copy full SHA for c24ab86 - Browse repository at this point
Copy the full SHA c24ab86View commit details -
Configuration menu - View commit details
-
Copy full SHA for f219e93 - Browse repository at this point
Copy the full SHA f219e93View commit details -
[const-eval] allow bitcast, select and relational functions for GLSL …
…since they should be supported
Configuration menu - View commit details
-
Copy full SHA for da17650 - Browse repository at this point
Copy the full SHA da17650View commit details -
[const-eval] evaluate
BinaryOperator::Modulo
correctly (use the tru……ncated version instead of floored)
Configuration menu - View commit details
-
Copy full SHA for 18f4de7 - Browse repository at this point
Copy the full SHA 18f4de7View commit details -
Configuration menu - View commit details
-
Copy full SHA for b737d3e - Browse repository at this point
Copy the full SHA b737d3eView commit details -
Properly recognize
Literal
expressions as non-dynamic indices. (#2537)Restore `negative_index` test in `tests/wgsl-errors.rs`, as part of the `invalid_arrays` test function.
Configuration menu - View commit details
-
Copy full SHA for 233c6c6 - Browse repository at this point
Copy the full SHA 233c6c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for c216a13 - Browse repository at this point
Copy the full SHA c216a13View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9171884 - Browse repository at this point
Copy the full SHA 9171884View commit details -
Configuration menu - View commit details
-
Copy full SHA for 260effb - Browse repository at this point
Copy the full SHA 260effbView commit details -
Configuration menu - View commit details
-
Copy full SHA for ca46c6d - Browse repository at this point
Copy the full SHA ca46c6dView commit details -
Configuration menu - View commit details
-
Copy full SHA for a0e0242 - Browse repository at this point
Copy the full SHA a0e0242View commit details -
Configuration menu - View commit details
-
Copy full SHA for 61d91eb - Browse repository at this point
Copy the full SHA 61d91ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for f53151d - Browse repository at this point
Copy the full SHA f53151dView commit details