This is an archive of the discontinued LLVM Phabricator instance.

[HLSL] Add __builtin_hlsl_create_handle
ClosedPublic

Authored by beanz on Jul 18 2022, 8:11 AM.

Details

Summary

This is pretty straightforward, it just adds a builtin to return a
pointer to a resource handle. This maps to a dx intrinsic.

The shape of this builtin and the underlying intrinsic will likely
shift a bit as this implementation becomes more feature complete, but
this is a good basis to get started.

Depends on D128569.

Diff Detail

Event Timeline

beanz created this revision.Jul 18 2022, 8:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2022, 8:11 AM
beanz requested review of this revision.Jul 18 2022, 8:11 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 18 2022, 8:11 AM
python3kgae added inline comments.Jul 18 2022, 9:41 AM
clang/test/CodeGenHLSL/builtins/create_handle.hlsl
5

What does the parameter 0 mean here?

beanz added inline comments.Jul 18 2022, 10:13 AM
clang/test/CodeGenHLSL/builtins/create_handle.hlsl
5

For the purposes of this test, the value doesn't matter, but in the next patch in the sequence D130017, I pass the resource class in that parameter.

bogner accepted this revision.Jul 27 2022, 11:49 AM
This revision is now accepted and ready to land.Jul 27 2022, 11:49 AM
This revision was landed with ongoing or failed builds.Jul 28 2022, 7:16 AM
This revision was automatically updated to reflect the committed changes.