ShaderLang
ShaderLang copied to clipboard
[Feature] Add support for bit operators on vectors of integers
Add support for bit operators (&, |, ~, <<, >>) on vector of integers.
- [ ] Implement bitwise operators to the
nzsl::Vectorclass (component-wise), beware of right shifting on integer which should be arithmetic (see BinaryShiftRightBase in ConstantPropagationVisitorBinaryArithmetics.cpp) - [ ] Extend sanitization rules to allow Vector of integers on bitwise ops.
- [ ] Extend GLSL, NZSL and SPIR-V generation (mostly improve the assertions)
- [ ] Implement constant propagation on vector of i32 and u32 (reuse the BinaryShiftRightBase and extends it)
- [ ] Add some tests in ArithmeticTests (extends "Bitwise operations", "Unary operators")
- [ ] Add some tests in OptimizationTests (add a new section "propagating vector constants bitwise")