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. Differential Revision: https://reviews.llvm.org/D130016
8 lines
226 B
HLSL
8 lines
226 B
HLSL
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
|
|
|
|
void fn() {
|
|
(void)__builtin_hlsl_create_handle(0);
|
|
}
|
|
|
|
// CHECK: call ptr @llvm.dx.create.handle(i8 0)
|