Files
clang-p2996/clang/test/CodeGenHLSL/builtins/create_handle.hlsl
Chris Bieneman fe13002bb3 [HLSL] Add __builtin_hlsl_create_handle
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
2022-07-28 09:16:11 -05:00

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)