Skip to content

[SPIR-V] Support global structures containing buffers #8301

@farzonl

Description

@farzonl

The following code works when targeting DXC:

https://hlsl.godbolt.org/z/MdMvsfe6z

struct B {
  RWStructuredBuffer<float3x4> Bufs[2];
};

B b1;
B b2;

[numthreads(1,1,1)]
void main() {

  float3x4 x = b1.Bufs[0][0];
  float3x4 y = b1.Bufs[1][0];
  b2.Bufs[0][0] = x + y;
  b2.Bufs[1][0] = x - y;
}

We intentionally fail when targeting SPIR-V

// CHECK: 12:3: error: global structures containing buffers are not supported

For now the plan is to mark this as not supported in SPIR-V for the offload test suite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug, regression, crashneeds-triageAwaiting triagespirvWork related to SPIR-V

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions