Skip to content
Snippets Groups Projects
  1. Dec 18, 2024
  2. Dec 17, 2024
  3. Dec 12, 2024
  4. Dec 11, 2024
    • Shaun Ren's avatar
      vkd3d-shader/hlsl: Implement normalization of binary expressions. · 2c9cf7c7
      Shaun Ren authored
      We normalize binary expressions by attempting to group constants
      together, in order to facilitate further simplification of the
      expressions.
      
      For any binary operator OP, non-constants x, y, and constants a, b, we
      apply the following rewrite rules:
      
        a OP x -> x OP a, if OP is commutative.
      
        (x OP a) OP b -> x OP (a OP b), if OP is associative.
      
        (x OP a) OP y -> (x OP y) OP a, if OP is associative and commutative.
      
        x OP (y OP a) -> (x OP y) OP a, if OP is associative.
      
      Note that we consider floating point operations to be
      non-associative.
      2c9cf7c7
  5. Dec 10, 2024
  6. Dec 09, 2024
  7. Nov 27, 2024
  8. Nov 23, 2024
  9. Nov 21, 2024
Loading