Skip to content

[SM6.9] Generate native vector variants of elementwise operators #7123

@pow2clk

Description

@pow2clk

In 6.9, elementwise vector operators should produce operators that work on the native vectors instead of scalarizing them. These operations include:

  • arithmetic operations: +, -(unary and binary), *, /, %, +=, -=, *=, /=
  • bitwise operations: |, &, ^, ~, |=, &=, ^=
  • equality operations: ==, !=, <, >, <=, >=
  • logic operations: ||, &&, ?:

Note that logic operations are disallowed for vectors as of HLSL2021 in favor of and, or, and select

This will largely be accomplished by disabling the scalarization passes that previously converted vectors to scalar variants. Testing should verify that the DXIL output preserves the vectors as arguments for all of these operators.

Metadata

Metadata

Assignees

Labels

enhancementFeature suggestionsm6.9Shader Model 6.9

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions