This is an archive of the discontinued LLVM Phabricator instance.

[HLSL] support ConstantBuffer
Needs ReviewPublic

Authored by python3kgae on Oct 25 2022, 11:45 PM.

Details

Summary

Support ConstantBuffer by define it like

template<typename T>
using ConstantBuffer = T;

Added new internal attribute HLSLConstantBufferView to mark CBV with AttributedType.

The document for ConstantBuffer in hlsl is at https://learn.microsoft.com/en-us/windows/win32/direct3d12/resource-binding-in-hlsl#constant-buffers

Diff Detail

Event Timeline

python3kgae created this revision.Oct 25 2022, 11:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2022, 11:45 PM
Herald added a subscriber: Anastasia. · View Herald Transcript
python3kgae requested review of this revision.Oct 25 2022, 11:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2022, 11:45 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
python3kgae edited the summary of this revision. (Show Details)Oct 26 2022, 10:07 AM
python3kgae edited the summary of this revision. (Show Details)

Fix windows test fail caused by dead ptr.

Change CBV implementation to
template<typename T>
using ConstantBuffer = T;

Added new internal attribute HLSLConstantBufferView to mark CBV with AttributedType.

python3kgae edited the summary of this revision. (Show Details)Dec 15 2022, 7:04 AM