Skip to content

[HLSL] Assigning array from cbuffer fails #133767

@llvm-beanz

Description

@llvm-beanz

Now that cbuffer values are declared in a unique address space we're seeing a failure assigning an array from a cbuffer:

cbuffer CBArrays : register(b0) {
  float c1[2];
  int4 c2[2][2];
  bool c3[2];
}

struct Arrays {
  float c1[2];
  int4 c2[2][2];
  bool c3[2];
};

RWStructuredBuffer<Arrays> Out : register(u0);

[numthreads(1,1,1)]
void main() {
  Out[0].c1 = c1;
  Out[0].c2 = c2;
  Out[0].c3 = c3;
}

Compiler Explorer

Metadata

Metadata

Assignees

Labels

HLSLHLSL Language Supportclang:frontendLanguage frontend issues, e.g. anything involving "Sema"

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions