llvm-project/clang/test/CodeGenHLSL/BasicFeatures/MatrixSingleSubscriptDynamicSwizzle.hlsl
Farzon Lotfi 60b6c53f25
[HLSL][Matrix] Add support for single subscript accessor (#170779)
fixes #166206

- Add swizzle support if row index is constant
- Add test cases
- Add new AST type
- Add new LValue for Matrix Row Type
- TODO: Make the new LValue a dynamic index version of ExtVectorElt
2025-12-17 17:04:28 -05:00

12 lines
359 B
HLSL

// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.7-library -disable-llvm-passes -emit-llvm -finclude-default-header -o - %s | FileCheck %s
// BUG: https://github.com/llvm/llvm-project/issues/170777
// XFAIL: *
void setMatrix(out float4x4 M, int index, float4 V) {
M[index].abgr = V;
}
float3 getMatrix(float4x4 M, int index) {
return M[index].rgb;
}