Steven Perron 9f6cd56d5a
[HLSL] Use HLSLToolChain for Vulkan (#110306)
The options are not translated correctly when targeting Vulkan using the
dxc
driver mode. Resuing the translator used for HLSL.

Fixes problem 2 in https://github.com/llvm/llvm-project/issues/108567.
2024-09-30 10:26:14 -04:00

18 lines
627 B
HLSL

// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
// RUN: dxil-pc-shadermodel6.3-compute %s -hlsl-entry foo \
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
// RUN: spirv-unknown-vulkan-compute %s -hlsl-entry foo \
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s
// Make sure not mangle entry.
// CHECK:define void @foo()
// Make sure add function attribute and numthreads attribute.
// CHECK:"hlsl.numthreads"="16,8,1"
// CHECK:"hlsl.shader"="compute"
[numthreads(16,8,1)]
void foo() {
}