This is an archive of the discontinued LLVM Phabricator instance.

[HLSL] support unbounded global resource array.
Needs ReviewPublic

Authored by python3kgae on Oct 21 2022, 12:25 PM.

Details

Summary

unbounded resource array is allowed in HLSL.
Here is an example.

RWBuffer<float> B[];
float main(uint ID : BufID) : SV_Target {

  return B[ID][0];
}

Type::isHLSLResourceType is added to check HLSLResource.
HLSLResourceAttr is added on the forward decl so it is ready when check incomplete array type.

Diff Detail

Event Timeline

python3kgae created this revision.Oct 21 2022, 12:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 21 2022, 12:25 PM
Herald added a subscriber: Anastasia. · View Herald Transcript
python3kgae requested review of this revision.Oct 21 2022, 12:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 21 2022, 12:25 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript