Nathan =?utf-8?q?Gau=C3=ABr?= ,
Nathan =?utf-8?q?Gau=C3=ABr?= ,
Nathan =?utf-8?q?Gau=C3=ABr?= ,
Nathan =?utf-8?q?Gau=C3=ABr?=
Message-ID:
In-Reply-To:
https://github.com/sudonatalie approved this pull request.
https://github.com/llvm/llvm-project/pull/88918
___
https://github.com/sudonatalie approved this pull request.
https://github.com/llvm/llvm-project/pull/91015
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sudonatalie approved this pull request.
LGTM, thanks for the work on this!
https://github.com/llvm/llvm-project/pull/90278
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
@@ -4284,11 +4284,31 @@ bool CompilerInvocation::ParseLangArgs(LangOptions
&Opts, ArgList &Args,
Diags.Report(diag::err_drv_hlsl_bad_shader_unsupported)
<< ShaderModel << T.getOSName() << T.str();
}
+// Validate that if fnative-half-type
https://github.com/sudonatalie approved this pull request.
https://github.com/llvm/llvm-project/pull/85340
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,19 @@
+// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 2016 %s 2>&1 |
FileCheck -check-prefix=both_invalid %s
+// RUN: not %clang_dxc -enable-16bit-types -T lib_6_4 -HV 2017 %s 2>&1 |
FileCheck -check-prefix=HV_invalid %s
+// RUN: not %clang_dxc -enable-16bi
https://github.com/sudonatalie edited
https://github.com/llvm/llvm-project/pull/85340
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4284,11 +4284,31 @@ bool CompilerInvocation::ParseLangArgs(LangOptions
&Opts, ArgList &Args,
Diags.Report(diag::err_drv_hlsl_bad_shader_unsupported)
<< ShaderModel << T.getOSName() << T.str();
}
+// Validate that if fnative-half-type
@@ -4284,11 +4284,25 @@ bool CompilerInvocation::ParseLangArgs(LangOptions
&Opts, ArgList &Args,
Diags.Report(diag::err_drv_hlsl_bad_shader_unsupported)
<< ShaderModel << T.getOSName() << T.str();
}
+// validate that if fnative-half-type
@@ -4284,11 +4284,25 @@ bool CompilerInvocation::ParseLangArgs(LangOptions
&Opts, ArgList &Args,
Diags.Report(diag::err_drv_hlsl_bad_shader_unsupported)
<< ShaderModel << T.getOSName() << T.str();
}
+// validate that if fnative-half-type
@@ -753,7 +753,10 @@ def err_drv_hlsl_unsupported_target : Error<
"HLSL code generation is unsupported for target '%0'">;
def err_drv_hlsl_bad_shader_required_in_target : Error<
"%select{shader model|Vulkan environment|shader stage}0 is required as
%select{OS|environment}1
@@ -4284,11 +4284,25 @@ bool CompilerInvocation::ParseLangArgs(LangOptions
&Opts, ArgList &Args,
Diags.Report(diag::err_drv_hlsl_bad_shader_unsupported)
<< ShaderModel << T.getOSName() << T.str();
}
+// validate that if fnative-half-type
@@ -753,7 +753,10 @@ def err_drv_hlsl_unsupported_target : Error<
"HLSL code generation is unsupported for target '%0'">;
def err_drv_hlsl_bad_shader_required_in_target : Error<
"%select{shader model|Vulkan environment|shader stage}0 is required as
%select{OS|environment}1
@@ -4258,6 +4258,18 @@ bool CompilerInvocation::ParseLangArgs(LangOptions
&Opts, ArgList &Args,
} else {
llvm_unreachable("expected DXIL or SPIR-V target");
}
+ // validate that if fnative-half-type is given, that
+ // the language standard is at
Nathan =?utf-8?q?Gau=C3=ABr?= ,
Nathan =?utf-8?q?Gau=C3=ABr?= ,
Nathan =?utf-8?q?Gau=C3=ABr?= ,
Nathan =?utf-8?q?Gau=C3=ABr?= ,
Nathan =?utf-8?q?Gau=C3=ABr?= ,
Nathan =?utf-8?q?Gau=C3=ABr?=
Message-ID:
In-Reply-To:
https://github.com/sudonatalie approved this pull request.
https://github.com/
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?=
Message-ID:
In-Reply-To:
https://github.com/sudonatalie commented:
LGTM in terms of how this affects the SPIR-V backend, but if others
https://github.com/sudonatalie closed
https://github.com/llvm/llvm-project/pull/82536
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sudonatalie updated
https://github.com/llvm/llvm-project/pull/82536
>From 07894302273722d8d8190db7780dde049b84e707 Mon Sep 17 00:00:00 2001
From: Natalie Chouinard
Date: Wed, 21 Feb 2024 21:18:20 +
Subject: [PATCH 1/3] [HLSL][SPIR-V] Add SV_DispatchThreadID semantic suppo
@@ -342,8 +343,19 @@ llvm::Value *CGHLSLRuntime::emitInputSemantic(IRBuilder<>
&B,
return B.CreateCall(FunctionCallee(DxGroupIndex));
}
if (D.hasAttr()) {
-llvm::Function *DxThreadID = CGM.getIntrinsic(Intrinsic::dx_thread_id);
-return buildVectorInput(B, DxThr
@@ -342,8 +343,19 @@ llvm::Value *CGHLSLRuntime::emitInputSemantic(IRBuilder<>
&B,
return B.CreateCall(FunctionCallee(DxGroupIndex));
}
if (D.hasAttr()) {
-llvm::Function *DxThreadID = CGM.getIntrinsic(Intrinsic::dx_thread_id);
-return buildVectorInput(B, DxThr
@@ -27,6 +27,7 @@
#include "llvm/CodeGen/GlobalISel/InstructionSelector.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
+#include "llvm/IR/IntrinsicsDirectX.h"
sudonatalie wrote:
Good catch, thanks
https://github
https://github.com/sudonatalie updated
https://github.com/llvm/llvm-project/pull/82536
>From 91600507765679e92434ec7c5edb883bf01f847f Mon Sep 17 00:00:00 2001
From: Natalie Chouinard
Date: Wed, 21 Feb 2024 21:18:20 +
Subject: [PATCH 1/3] [HLSL][SPIR-V] Add SV_DispatchThreadID semantic suppo
https://github.com/sudonatalie closed
https://github.com/llvm/llvm-project/pull/83062
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sudonatalie created
https://github.com/llvm/llvm-project/pull/83062
Noticed while implementing #82536 that this test was also missing the call the
FileCheck.
>From 3946bd3188e5e9b9765301057cc53b7ac06f184b Mon Sep 17 00:00:00 2001
From: Natalie Chouinard
Date: Mon, 26 Feb 20
@@ -1,28 +1,25 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm
-finclude-default-header -disable-llvm-passes -o - %s
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm
-finclude-default-header -disable-llvm-passes -o -
@@ -1,28 +1,25 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm
-finclude-default-header -disable-llvm-passes -o - %s
sudonatalie wrote:
Note: This test didn't actually have a call to `FileCheck` before, so I had to
make some min
@@ -0,0 +1,76 @@
+; RUN: llc -O0 -mtriple=spirv-vulkan-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-vulkan-unknown %s -o -
-filetype=obj | spirv-val %}
+
+; This file generated from the following HLSL:
+; clang -cc1 -triple spirv-vulkan-library
@@ -1427,6 +1432,8 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register
ResVReg,
.addUse(I.getOperand(2).getReg())
.addUse(I.getOperand(3).getReg());
break;
+ case Intrinsic::dx_thread_id:
+return selectDXThreadId(ResVReg, ResType, I);
--
https://github.com/sudonatalie updated
https://github.com/llvm/llvm-project/pull/82536
>From 91600507765679e92434ec7c5edb883bf01f847f Mon Sep 17 00:00:00 2001
From: Natalie Chouinard
Date: Wed, 21 Feb 2024 21:18:20 +
Subject: [PATCH 1/2] [HLSL][SPIR-V] Add SV_DispatchThreadID semantic suppo
https://github.com/sudonatalie closed
https://github.com/llvm/llvm-project/pull/81038
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sudonatalie ready_for_review
https://github.com/llvm/llvm-project/pull/81038
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sudonatalie created
https://github.com/llvm/llvm-project/pull/81038
Add a SPIR-V target-specific intrinsic for creating handles, which is used for
lowering HLSL resources types like RWBuffer.
`llvm/lib/TargetParser/Triple.cpp`: SPIR-V intrinsics use "spv" as the target
pre
https://github.com/sudonatalie closed
https://github.com/llvm/llvm-project/pull/78611
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sudonatalie created
https://github.com/llvm/llvm-project/pull/78611
Add the -fspv-target-env option to the clang-dxc compatibility driver to
specify the SPIR-V target environment, which is propagated to the target Triple.
>From d950de9ff25efdb81492eb630ba190a75c2762cf Mon Se
https://github.com/sudonatalie closed
https://github.com/llvm/llvm-project/pull/76749
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
sudonatalie wrote:
Rebased again and local `check-all` succeeds.
https://github.com/llvm/llvm-project/pull/76749
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
sudonatalie wrote:
Rebased due to conflicts. I'm going to go ahead and merge this today to make
the next dependent change easier to review, but DXIL folks please still feel
free to follow-up if there are any concerns.
(Also, ignoring the code formatter bot since it seems to be an existing
int
https://github.com/sudonatalie updated
https://github.com/llvm/llvm-project/pull/76749
>From 0aa15ea1cc6cec12bc347aff1753a95894fa1677 Mon Sep 17 00:00:00 2001
From: Natalie Chouinard
Date: Fri, 15 Dec 2023 20:50:43 +
Subject: [PATCH 1/4] [HLSL][SPIR-V] Add Vulkan to target triple
Add suppo
https://github.com/sudonatalie edited
https://github.com/llvm/llvm-project/pull/76749
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,4 +1,4 @@
-// REQUIRES: dxil-registered-target
sudonatalie wrote:
This test wasn't being run for me before. I think this change is correct?
https://github.com/llvm/llvm-project/pull/76749
___
cfe-commits mailing
https://github.com/sudonatalie commented:
Will wait for a +1 from @llvm-beanz or @bogner since I modified the error
messages slightly for DXIL too
https://github.com/llvm/llvm-project/pull/76749
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/sudonatalie updated
https://github.com/llvm/llvm-project/pull/76749
>From 6141382cebfe0a40c054b2ce7539ec6ff85f3c14 Mon Sep 17 00:00:00 2001
From: Natalie Chouinard
Date: Fri, 15 Dec 2023 20:50:43 +
Subject: [PATCH 1/4] [HLSL][SPIR-V] Add Vulkan to target triple
Add suppo
@@ -3,29 +3,39 @@
// Supported targets
//
// RUN: %clang -target dxil-unknown-shadermodel6.2-compute %s -S -o /dev/null
2>&1 | FileCheck --allow-empty --check-prefix=CHECK-VALID %s
-// RUN: %clang -target spirv-unknown-shadermodel6.2-compute %s -S -o /dev/null
2>&1 | FileChec
@@ -1328,6 +1331,31 @@ VersionTuple Triple::getDriverKitVersion() const {
}
}
+VersionTuple Triple::getVulkanVersion() const {
+ if (getArch() != spirv || getOS() != Vulkan)
+llvm_unreachable("invalid Vulkan SPIR-V triple");
+
+ VersionTuple VulkanVersion = getOSVersio
@@ -4236,20 +4236,35 @@ bool CompilerInvocation::ParseLangArgs(LangOptions
&Opts, ArgList &Args,
// TODO: Revisit restricting SPIR-V to logical once we've figured out how
to
// handle PhysicalStorageBuffer64 memory model
if (T.isDXIL() || T.isSPIRVLogical()) {
-
https://github.com/sudonatalie updated
https://github.com/llvm/llvm-project/pull/76749
>From 6141382cebfe0a40c054b2ce7539ec6ff85f3c14 Mon Sep 17 00:00:00 2001
From: Natalie Chouinard
Date: Fri, 15 Dec 2023 20:50:43 +
Subject: [PATCH 1/2] [HLSL][SPIR-V] Add Vulkan to target triple
Add suppo
https://github.com/sudonatalie created
https://github.com/llvm/llvm-project/pull/76749
Add support for specifying the logical SPIR-V target environment in the triple
as Vulkan. When compiling HLSL, this replaces the DirectX Shader Model with a
Vulkan environment instead.
Currently, the only s
https://github.com/sudonatalie closed
https://github.com/llvm/llvm-project/pull/65989
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sudonatalie updated
https://github.com/llvm/llvm-project/pull/65989
>From 7f3cc0939b7840773f773870957fe2db0a93a502 Mon Sep 17 00:00:00 2001
From: Natalie Chouinard
Date: Mon, 11 Sep 2023 18:08:17 +
Subject: [PATCH 1/3] [SPIRV] Add -spirv option to DXC driver
Add an optio
https://github.com/sudonatalie closed
https://github.com/llvm/llvm-project/pull/70330
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
sudonatalie wrote:
Going to go ahead and merge this since it's just a test fix, but @bogner let me
know if you have any concerns.
https://github.com/llvm/llvm-project/pull/70330
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llv
@@ -2,8 +2,8 @@
// Supported targets
//
-// RUN: %clang -target dxil-unknown-shadermodel6.2-pixel %s -S -o /dev/null
2>&1 | FileCheck --check-prefix=CHECK-VALID %s
-// RUN: %clang -target spirv-unknown-shadermodel6.2-library %s -S -o /dev/null
2>&1 | FileCheck --check-prefix
https://github.com/sudonatalie updated
https://github.com/llvm/llvm-project/pull/65989
>From 331e1a92f2d93dcd5e7e1cae25ce51f33b2c8ffe Mon Sep 17 00:00:00 2001
From: Natalie Chouinard
Date: Mon, 11 Sep 2023 18:08:17 +
Subject: [PATCH 1/3] [SPIRV] Add -spirv option to DXC driver
Add an optio
@@ -2,8 +2,8 @@
// Supported targets
//
-// RUN: %clang -target dxil-unknown-shadermodel6.2-pixel %s -S -o /dev/null
2>&1 | FileCheck --check-prefix=CHECK-VALID %s
-// RUN: %clang -target spirv-unknown-shadermodel6.2-library %s -S -o /dev/null
2>&1 | FileCheck --check-prefix
https://github.com/sudonatalie edited
https://github.com/llvm/llvm-project/pull/65989
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sudonatalie updated
https://github.com/llvm/llvm-project/pull/65989
>From 4738a535e24114ce24647f0935b1cec897bf0a1b Mon Sep 17 00:00:00 2001
From: Natalie Chouinard
Date: Thu, 26 Oct 2023 13:21:23 +
Subject: [PATCH 1/4] [HLSL][SPIR-V] Fix clang driver lang target test
Thi
@@ -2,8 +2,8 @@
// Supported targets
//
-// RUN: %clang -target dxil-unknown-shadermodel6.2-pixel %s -S -o /dev/null
2>&1 | FileCheck --check-prefix=CHECK-VALID %s
-// RUN: %clang -target spirv-unknown-shadermodel6.2-library %s -S -o /dev/null
2>&1 | FileCheck --check-prefix
https://github.com/sudonatalie created
https://github.com/llvm/llvm-project/pull/70330
This test has been failing since the SPIR-V backend started failing explicitly
on unsupported shader types. Switched this test to a compute shader since it is
currently the only type supported.
>From 4738a5
@@ -2,8 +2,8 @@
// Supported targets
//
-// RUN: %clang -target dxil-unknown-shadermodel6.2-pixel %s -S -o /dev/null
2>&1 | FileCheck --check-prefix=CHECK-VALID %s
-// RUN: %clang -target spirv-unknown-shadermodel6.2-library %s -S -o /dev/null
2>&1 | FileCheck --check-prefix
@@ -2,8 +2,8 @@
// Supported targets
//
-// RUN: %clang -target dxil-unknown-shadermodel6.2-pixel %s -S -o /dev/null
2>&1 | FileCheck --check-prefix=CHECK-VALID %s
-// RUN: %clang -target spirv-unknown-shadermodel6.2-library %s -S -o /dev/null
2>&1 | FileCheck --check-prefix
sudonatalie wrote:
Left this on the back burner for a bit, but it would be nice to land now.
@llvm-beanz or @bogner Can you take a look?
https://github.com/llvm/llvm-project/pull/65989
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://li
https://github.com/sudonatalie updated
https://github.com/llvm/llvm-project/pull/65989
>From 46b615e1c40ca89b8d4b9e924c139a5e9c430565 Mon Sep 17 00:00:00 2001
From: Natalie Chouinard
Date: Mon, 11 Sep 2023 18:08:17 +
Subject: [PATCH 1/4] [SPIRV] Add -spirv option to DXC driver
Add an optio
https://github.com/sudonatalie edited
https://github.com/llvm/llvm-project/pull/65989
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sudonatalie updated
https://github.com/llvm/llvm-project/pull/65989
>From 46b615e1c40ca89b8d4b9e924c139a5e9c430565 Mon Sep 17 00:00:00 2001
From: Natalie Chouinard
Date: Mon, 11 Sep 2023 18:08:17 +
Subject: [PATCH 1/2] [SPIRV] Add -spirv option to DXC driver
Add an optio
sudonatalie wrote:
@llvm-beanz Can you take a look at this PR? I don't seem to be able to assign
Reviewers, maybe because I don't have committer status yet.
https://github.com/llvm/llvm-project/pull/65989
___
cfe-commits mailing list
cfe-commits@lists
https://github.com/sudonatalie review_requested
https://github.com/llvm/llvm-project/pull/65989
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sudonatalie created
https://github.com/llvm/llvm-project/pull/65989:
Add an option to target SPIR-V to the clang-dxc driver, which sets the target
triple's architecture to logical SPIR-V.
>From 699235b506e1949293305973429bd3ec3ee1b9e4 Mon Sep 17 00:00:00 2001
From: Natalie C
67 matches
Mail list logo