Skip to content

[HLSL] Add support for indexing of sub-arrays of multi-dimensional resource arrays #145426

@hekota

Description

@hekota

Add support for indexing sub-arrays of multi-dimensional resource arrays to Clang codegen handling of ArraySubscriptExpr AST node.

For this example:

RWBuffer<float> N[10][5] : register(u0);
RWBuffer<float> Out;

float foo(RWBuffer<float> P[5]) {
  return P[3][0];
}

[numthreads(4,1,1)]
void main() {
  Out[0] = foo(N[7]);
}

The N[7] expression should create a local copy of the sub-array of size 5.

Depends on #145424.

Metadata

Metadata

Assignees

Labels

HLSLHLSL Language Support

Type

No type

Projects

Status

Active

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions