-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[HLSL][RootSignature] Add fdx-rootsignature-version
option to specify root signature version
#144813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HLSL][RootSignature] Add fdx-rootsignature-version
option to specify root signature version
#144813
Changes from 7 commits
6af81bb
3d99b53
34c9646
57b3121
83babf9
36b8eb9
846e66f
33eb72a
65e4589
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3825,16 +3825,18 @@ static void RenderOpenCLOptions(const ArgList &Args, ArgStringList &CmdArgs, | |
|
||
static void RenderHLSLOptions(const ArgList &Args, ArgStringList &CmdArgs, | ||
types::ID InputType) { | ||
const unsigned ForwardedArguments[] = {options::OPT_dxil_validator_version, | ||
options::OPT_res_may_alias, | ||
options::OPT_D, | ||
options::OPT_I, | ||
options::OPT_O, | ||
options::OPT_emit_llvm, | ||
options::OPT_emit_obj, | ||
options::OPT_disable_llvm_passes, | ||
options::OPT_fnative_half_type, | ||
options::OPT_hlsl_entrypoint}; | ||
const unsigned ForwardedArguments[] = { | ||
options::OPT_dxil_validator_version, | ||
options::OPT_res_may_alias, | ||
options::OPT_D, | ||
options::OPT_I, | ||
options::OPT_O, | ||
options::OPT_emit_llvm, | ||
options::OPT_emit_obj, | ||
options::OPT_disable_llvm_passes, | ||
options::OPT_fnative_half_type, | ||
options::OPT_hlsl_entrypoint, | ||
options::OPT_fdx_rootsignature_version}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this necessary? Since the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is required. The naming is quite confusing, this is what will forward the argument to be used in cc1. The changes in |
||
if (!types::isHLSL(InputType)) | ||
return; | ||
for (const auto &Arg : ForwardedArguments) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// RUN: %clang_dxc -T cs_6_0 -fcgl %s | FileCheck %s --check-prefix=CHECK-V1_1 | ||
|
||
// RUN: %clang_dxc -T cs_6_0 -fcgl -force-rootsig-ver rootsig_1_0 %s | FileCheck %s --check-prefix=CHECK-V1_0 | ||
// RUN: %clang_dxc -T cs_6_0 -fcgl -force-rootsig-ver rootsig_1_1 %s | FileCheck %s --check-prefix=CHECK-V1_1 | ||
|
||
// Test to demonstrate that we can specify the root-signature versions | ||
|
||
// CHECK: !dx.rootsignatures = !{![[#EMPTY_ENTRY:]]} | ||
// CHECK: ![[#EMPTY_ENTRY]] = !{ptr @EmptyEntry, ![[#EMPTY:]], | ||
// CHECK-V1_0: i32 1} | ||
// CHECK-V1_1: i32 2} | ||
// CHECK: ![[#EMPTY]] = !{} | ||
|
||
[shader("compute"), RootSignature("")] | ||
[numthreads(1,1,1)] | ||
void EmptyEntry() {} |
Uh oh!
There was an error while loading. Please reload this page.