llvm-project/clang/test/CodeGenHLSL/all-resources-bound.hlsl
Joshua Batista 52e815f1cd
[HLSL] Add allresourcesbound option to DXC driver and set corresponding module flag (#173411)
This PR adds a new CC1 option and a new dxc driver option. The DXC
option, when set, is translated into the new CC1 option.
The `all-resources-bound` dxc option will create a metadata module flag,
and the print-dx-shader-flags pass will set the appropriate shader
module flag from this metadata module flag.

Fixes https://github.com/llvm/llvm-project/issues/112264
2025-12-30 10:15:46 -08:00

8 lines
390 B
HLSL

// RUN: %clang_dxc -all-resources-bound -T lib_6_3 -HV 202x -Vd -Xclang -emit-llvm %s | FileCheck %s --check-prefix=FLAG
// RUN: %clang_dxc -T lib_6_3 -HV 202x -Xclang -emit-llvm %s | FileCheck %s --check-prefix=NOFLAG
// FLAG-DAG: ![[ARB:.*]] = !{i32 1, !"dx.allresourcesbound", i32 1}
// FLAG-DAG: !llvm.module.flags = !{{{.*}}![[ARB]]{{.*}}}
// NOFLAG-NOT: dx.allresourcesbound