https://github.com/llvm-beanz approved this pull request.
I think dependencies for object libraries are implicitly `INTERAFCE`, but it
might be nice to make that explicit. I know CMake complains if you mix and
match implicit and explicit specification of linkage types.
Otherwise LGTM.
https:/
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/93454
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvm-beanz wrote:
LGTM. Sorry for the delay.
https://github.com/llvm/llvm-project/pull/92591
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/92591
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7401,7 +7495,8 @@ b for constant buffer views (CBV).
Register space is specified in the format ``space[number]`` and defaults to
``space0`` if omitted.
Here're resource binding examples with and without space:
-.. code-block:: c++
+
+.. code-block:: hlsl
llvm-beanz wrote:
Can you also add some tests for nested loops?
Cases like:
```hlsl
[unroll]
for( int i = 0; i < 100; ++i) { // unroll this
for( int j = 0; j < 100; ++j) { // but not this
}
}
```
https://github.com/llvm/llvm-project/pull/93879
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/93847
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz approved this pull request.
I have one suggested code simplification which will also require test updates,
but in general I think this is good.
https://github.com/llvm/llvm-project/pull/92704
___
cfe-commits mailing list
@@ -1060,18 +1060,25 @@ static llvm::StringRef
canonicalizePlatformName(llvm::StringRef Platform) {
.Case("ShaderModel", "shadermodel")
.Default(Platform);
}
-static llvm::StringRef getPrettyEnviromentName(llvm::StringRef Environment) {
-return ll
@@ -290,3 +294,295 @@ void SemaHLSL::DiagnoseAttrStageMismatch(
<< A << HLSLShaderAttr::ConvertShaderTypeToStr(Stage)
<< (AllowedStages.size() != 1) << join(StageStrings, ", ");
}
+
+namespace {
+
+/// This class implements HLSL availability diagnostics for default
@@ -290,3 +294,295 @@ void SemaHLSL::DiagnoseAttrStageMismatch(
<< A << HLSLShaderAttr::ConvertShaderTypeToStr(Stage)
<< (AllowedStages.size() != 1) << join(StageStrings, ", ");
}
+
+namespace {
+
+/// This class implements HLSL availability diagnostics for default
https://github.com/llvm-beanz commented:
Looks pretty good to me. A few nits that you can take or leave.
The one real concern I have is that I actually don't like
`getPrettyEnviromentName` being a string->string mapping. Is it possible to
instead use the Triple environment enum?
https://githu
@@ -1068,11 +1068,37 @@ static llvm::StringRef
getPrettyEnviromentName(llvm::StringRef Environment) {
.Case("hull", "hull shader")
.Case("domain", "domain shader")
.Case("compute", "compute shader")
+ .Case("raygeneration", "r
@@ -290,3 +294,295 @@ void SemaHLSL::DiagnoseAttrStageMismatch(
<< A << HLSLShaderAttr::ConvertShaderTypeToStr(Stage)
<< (AllowedStages.size() != 1) << join(StageStrings, ", ");
}
+
+namespace {
+
+/// This class implements HLSL availability diagnostics for default
@@ -290,3 +294,295 @@ void SemaHLSL::DiagnoseAttrStageMismatch(
<< A << HLSLShaderAttr::ConvertShaderTypeToStr(Stage)
<< (AllowedStages.size() != 1) << join(StageStrings, ", ");
}
+
+namespace {
+
+/// This class implements HLSL availability diagnostics for default
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/92704
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz approved this pull request.
We've waited a week on this PR to see if anyone from Apple will chime in. On
previous PRs we waited weeks and got no response. We've reached out on Discord
too.
This PR looks sane to me and it seems to have adequate testing. I think we
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/92793
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvm-beanz wrote:
Merging before the PR bots finish since the PR bots don't actually use this
file anyways...
https://github.com/llvm/llvm-project/pull/92793
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailma
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/92793
Doh! CMake cache scripts don't have generator variables set yet, so the script
can't depend on the generator variables. Instead I've added a variable that a
user can specify to enable the distribution setting
llvm-beanz wrote:
I think the different slice there is platform vs language. SemaHLSL should be
where HLSL tests go regardless of platform (DirectX or Vulkan), but we should
try to keep HLSL separate from C/C++ tests.
https://github.com/llvm/llvm-project/pull
@@ -0,0 +1,139 @@
+=
+HLSL Availability Diagnostics
+=
+
+.. contents::
+ :local:
+
+Introduction
+
+
+HLSL availability diagnostics emits errors or warning when unavailable shader
APIs are used. Unavailable sh
@@ -0,0 +1,139 @@
+=
+HLSL Availability Diagnostics
+=
+
+.. contents::
+ :local:
+
+Introduction
+
+
+HLSL availability diagnostics emits errors or warning when unavailable shader
APIs are used. Unavailable sh
https://github.com/llvm-beanz approved this pull request.
A few small suggestions feel free to take them or leave them, otherwise looks
good.
https://github.com/llvm/llvm-project/pull/92207
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/92207
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz commented:
A couple comments, but mostly this looks good to me.
https://github.com/llvm/llvm-project/pull/89809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
llvm-beanz wrote:
nit: we've generally tried to keep the HLSL-specific tests separated from the
other language tests (i.e. SemaHLSL).
https://github.com/llvm/llvm-project/pull/89809
___
cfe-commits mailing list
cfe-c
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/89809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/92011
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8,6 +8,12 @@ set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD "DirectX;SPIRV" CACHE
STRING "")
# HLSL support is currently limted to clang, eventually it will expand to
# clang-tools-extra too.
-set(LLVM_ENABLE_PROJECTS "clang" CACHE STRING "")
+set(LLVM_ENABLE_PROJECTS "clang;clan
llvm-beanz wrote:
> This PR will not change this. The padding will only be added when required.
_That's the problem_
>
> ```hlsl
> cbuffer {
> float F;
> float2 V;
> }
> ```
>
> will still got
>
> ```llvm
> type { float, <2 x float>}
> ```
And there will implicitly be padding between th
llvm-beanz wrote:
> You can use `type <{ float, <2 x float>}>` if you need the tightly-packed
> layout.
I think we need to figure out how we're going to lower this too. Loading from
this memory space requires loading 128 bytes at a time, and we need to slice it
down to just the parts of the s
llvm-beanz wrote:
> Could you explain more about can't put any vectors or matrices into the
> cbuffer structure type?
Consider this example (regardless of packoffset):
```hlsl
cbuffer {
float F;
float2 V;
}
```
The layout for this is basically:
```c
struct {
float F;
float Vx; // v.x
https://github.com/llvm-beanz commented:
I'm a little concerned about the strategy here. LLVM generally doesn't
explicitly capture padding it relies on the data layout rules to capture that.
If this is the approach we're going with you can't put any vectors or matrices
into the cbuffer structu
@@ -5671,6 +5671,54 @@ HLSLBufferDecl
*HLSLBufferDecl::CreateDeserialized(ASTContext &C,
SourceLocation(), SourceLocation());
}
+static uint64_t calculateLegacyCbufferAlign(const ASTContext &Context,
+
https://github.com/llvm-beanz commented:
Overall this looks good to me. One set of suggestions inline.
https://github.com/llvm/llvm-project/pull/89809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listin
@@ -772,40 +816,58 @@ void
DiagnoseUnguardedAvailability::DiagnoseDeclAvailability(
const AvailabilityAttr *AA =
getAttrForPlatform(SemaRef.getASTContext(), OffendingDecl);
+bool EnvironmentMatchesOrNone =
+hasMatchingEnvironmentOrNone(SemaRef.getASTCont
@@ -376,26 +400,46 @@ static void DoEmitAvailabilityWarning(Sema &S,
AvailabilityResult K,
// not specified for deployment targets >= to iOS 11 or equivalent or
// for declarations that were introduced in iOS 11 (macOS 10.13, ...) or
// later.
-const Availabili
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/92011
>From e1b82c5bb1869ac74080e17633bd8ac7931a47b6 Mon Sep 17 00:00:00 2001
From: Chris B
Date: Mon, 13 May 2024 13:55:49 -0500
Subject: [PATCH 1/2] [HLSL][CMake] Add clangd and distribution settings
This just ad
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/92011
This just adds some simple distribution settings and includes clangd in the
build for distribution.
>From e1b82c5bb1869ac74080e17633bd8ac7931a47b6 Mon Sep 17 00:00:00 2001
From: Chris B
Date: Mon, 13 May 202
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/89836
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/89836
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4372,6 +4372,13 @@ def HLSLResourceBinding: InheritableAttr {
let Documentation = [HLSLResourceBindingDocs];
}
+def HLSLPackOffset: HLSLAnnotationAttr {
+ let Spellings = [HLSLAnnotation<"packoffset">];
+ let LangOpts = [HLSL];
+ let Args = [IntArgument<"Offset">];
--
@@ -1206,6 +1233,47 @@ std::string Triple::normalize(StringRef Str) {
}
}
+ // Normalize DXIL triple if it does not include DXIL version number.
+ // Determine DXIL version number using the minor version number of Shader
+ // Model version specified in target triple,
https://github.com/llvm-beanz closed
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/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/90809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz edited
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/llvm-beanz edited
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/llvm-beanz created
https://github.com/llvm/llvm-project/pull/91015
This implements the HLSL 202x conforming literals feature.
The feature proposal is available here:
https://github.com/microsoft/hlsl-specs/blob/main/proposals/0017-conform
ing-literals.md
The language specif
https://github.com/llvm-beanz commented:
Given that @bogner had concerns about the other approach I think we should get
him to review this before moving forward.
That said, other than some missing unit test coverage I think this approach
looks fine.
https://github.com/llvm/llvm-project/pull/9
@@ -1200,6 +1224,27 @@ std::string Triple::normalize(StringRef Str) {
}
}
+ // Normalize DXIL triple if it does not include DXIL version number.
+ // Determine DXIL version number using the minor version number of Shader
+ // Model version specified in target triple,
llvm-beanz wrote:
> I don't know if the pre-commit testing guarantees that. Configuration
> settings will permit the files to be checked out in either Unix (`\n`) or
> Windows (`\r\n`) line-endings.
Today on Windows you basically have to check out LLVM as unix line endings.
There are a bunch
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/90694
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/90222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz requested changes to this pull request.
I'm marking this as requesting changes because I don't think we should land
this as-is.
https://github.com/llvm/llvm-project/pull/89836
___
cfe-commits mailing list
cfe-commits@list
@@ -108,3 +108,18 @@ behavior between Clang and DXC. Some examples include:
diagnostic notifying the user of the conversion rather than silently altering
precision relative to the other overloads (as FXC does) or generating code
that will fail validation (as DXC does).
+
@@ -4372,6 +4372,13 @@ def HLSLResourceBinding: InheritableAttr {
let Documentation = [HLSLResourceBindingDocs];
}
+def HLSLPackOffset: HLSLAnnotationAttr {
+ let Spellings = [HLSLAnnotation<"packoffset">];
+ let LangOpts = [HLSL];
+ let Args = [IntArgument<"Offset">];
--
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/90222
>From a173605b6043739e69f89d3a559a4f6a68d5fc0a Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Thu, 25 Apr 2024 15:47:22 -0500
Subject: [PATCH 1/2] [HLSL] Shore up floating point conversions
This PR fixes
@@ -0,0 +1,229 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-finclude-default-header -Wconversion -verify -o - %s
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-finclude-default-header -ast-dump %s | FileCheck %
@@ -4393,6 +4401,24 @@ getFixedEnumPromtion(Sema &S, const
StandardConversionSequence &SCS) {
return FixedEnumPromotion::ToPromotedUnderlyingType;
}
+static ImplicitConversionSequence::CompareKind
+HLSLCompareFloatingRank(QualType LHS, QualType RHS) {
+ assert(LHS->isVecto
@@ -2616,6 +2617,13 @@ bool Sema::IsFloatingPointPromotion(QualType FromType,
QualType ToType) {
ToBuiltin->getKind() == BuiltinType::Ibm128))
return true;
+ // In HLSL, `half` promotes to `float` or `double`, regardless of whether
+ // or not nat
@@ -0,0 +1,229 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-finclude-default-header -Wconversion -verify -o - %s
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-finclude-default-header -ast-dump %s | FileCheck %
@@ -4372,6 +4372,13 @@ def HLSLResourceBinding: InheritableAttr {
let Documentation = [HLSLResourceBindingDocs];
}
+def HLSLPackOffset: HLSLAnnotationAttr {
+ let Spellings = [HLSLAnnotation<"packoffset">];
+ let LangOpts = [HLSL];
+ let Args = [IntArgument<"Offset">];
--
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/90694
>From 2464bcb75b047c49076f0718470f27a561252a62 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Tue, 30 Apr 2024 20:49:35 -0500
Subject: [PATCH 1/2] [NFC][HLSL] Cleanup TargetInfo handling
We had some odd
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/90694
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/90694
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -406,6 +406,16 @@ void TargetInfo::adjust(DiagnosticsEngine &Diags,
LangOptions &Opts) {
LongDoubleAlign = 64;
}
+ // HLSL explicitly defines the sizes and formats of some data types, and we
+ // need to conform to those regardless of what architecture you are
tar
@@ -1612,15 +1612,7 @@ const llvm::fltSemantics
&ASTContext::getFloatTypeSemantics(QualType T) const {
case BuiltinType::Float16:
return Target->getHalfFormat();
case BuiltinType::Half:
-// For HLSL, when the native half type is disabled, half will be treat as
-
@@ -0,0 +1,77 @@
+// This tests that the coroutine elide optimization could happen succesfully
with ThinLTO.
+// This test is adapted from coro-elide.cpp and splits functions into two
files.
+//
+// RUN: split-file %s %t
+// RUN: %clang --target=x86_64-linux -std=c++20 -O2 -flto
@@ -406,6 +406,16 @@ void TargetInfo::adjust(DiagnosticsEngine &Diags,
LangOptions &Opts) {
LongDoubleAlign = 64;
}
+ // HLSL explicitly defines the sizes and formats of some data types, and we
+ // need to conform to those regardless of what architecture you are
tar
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/90694
We had some odd places where we set target behaviors. We were setting the long
size in target-specific code, but it should be language-based. We were not
setting the Half float type semantics correctly, and i
@@ -0,0 +1,77 @@
+// This tests that the coroutine elide optimization could happen succesfully
with ThinLTO.
+// This test is adapted from coro-elide.cpp and splits functions into two
files.
+//
+// RUN: split-file %s %t
+// RUN: %clang --target=x86_64-linux -std=c++20 -O2 -flto
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/90222
>From a173605b6043739e69f89d3a559a4f6a68d5fc0a Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Thu, 25 Apr 2024 15:47:22 -0500
Subject: [PATCH] [HLSL] Shore up floating point conversions
This PR fixes bug
@@ -7314,6 +7314,41 @@ static void handleHLSLSV_DispatchThreadIDAttr(Sema &S,
Decl *D,
D->addAttr(::new (S.Context) HLSLSV_DispatchThreadIDAttr(S.Context, AL));
}
+static void handleHLSLPackOffsetAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
+ if (!isa(D) || !isa(D->getDe
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -triple dxil-unknown-shadermodel6.3-library -S
-finclude-default-header -ast-dump -x hlsl %s | FileCheck %s
+
+
+// CHECK: HLSLBufferDecl {{.*}} cbuffer A
+cbuffer A
+{
+// CHECK-NEXT: VarDecl {{.*}} C1 'float4'
llvm-bea
@@ -183,6 +183,86 @@ void Parser::ParseHLSLAnnotations(ParsedAttributes &Attrs,
return;
}
} break;
+ case ParsedAttr::AT_HLSLPackOffset: {
+// Parse 'packoffset( c[Subcomponent][.component] )'.
+// Check '('.
+if (ExpectAndConsume(tok::l_paren, diag::er
@@ -0,0 +1,55 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.3-library -verify %s
+
+// expected-error@+1{{cannot mix packoffset elements with nonpackoffset
elements in a cbuffer}}
+cbuffer Mix
+{
+float4 M1 : packoffset(c0);
+float M2;
+
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -triple dxil-unknown-shadermodel6.3-library -S
-finclude-default-header -ast-dump -x hlsl %s | FileCheck %s
+
+
+// CHECK: HLSLBufferDecl {{.*}} cbuffer A
+cbuffer A
+{
+// CHECK-NEXT: VarDecl {{.*}} C1 'float4'
+// CHECK-NEXT: HLSLP
@@ -7398,6 +7398,26 @@ The full documentation is available here:
https://docs.microsoft.com/en-us/windo
}];
}
+def HLSLPackOffsetDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The packoffset attribute is used to change the layout of a cbuffer.
llvm-beanz wrote:
> While I like the approach of aligning availability parameters closer to
> `llvm::Triple`, I am concerned about how this will interact with existing
> precedent. There is a lot of code that passes in _platform_ values that
> aren't actually `OSType`. For example
> `__attrib
@@ -0,0 +1,229 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-finclude-default-header -Wconversion -verify -o - %s
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-finclude-default-header -ast-dump %s | FileCheck %
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/90222
This PR fixes bugs in HLSL floating conversions. HLSL always has `half`,
`float` and `double` types, which promote in the order:
`half`->`float`->`double`
and convert in the order:
`double`->`float`->`half`
@@ -39,11 +39,44 @@ static bool isIntrinsicExpansion(Function &F) {
case Intrinsic::dx_uclamp:
case Intrinsic::dx_lerp:
case Intrinsic::dx_rcp:
+ case Intrinsic::dx_sdot:
+ case Intrinsic::dx_udot:
return true;
}
return false;
}
+static bool expandIntegerD
@@ -3859,7 +3862,7 @@ def warn_availability_fuchsia_unavailable_minor : Warning<
InGroup;
def warn_unguarded_availability :
- Warning<"%0 is only available on %1 %2 or newer">,
+ Warning<"%0 %select{is only|is not}5 available %select{|in %4 environment
}3on %1 %2 %select{
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/89809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz commented:
Overall I really like the direction of this. I'm curious if any of the
maintainers from Apple have thoughts since they're the primary users of
availability annotations.
I think this dramatically simplifies things for what we need, but it might also
hav
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/89788
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/89823
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -68,25 +68,25 @@ TEST(DxcModeTest, TargetProfileValidation) {
IntrusiveRefCntPtr DiagOpts = new DiagnosticOptions();
DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagConsumer);
- validateTargetProfile("-Tvs_6_0", "dxil--shadermodel6.0-vertex",
+ validateTargetProfile("
@@ -68,25 +68,25 @@ TEST(DxcModeTest, TargetProfileValidation) {
IntrusiveRefCntPtr DiagOpts = new DiagnosticOptions();
DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagConsumer);
- validateTargetProfile("-Tvs_6_0", "dxil--shadermodel6.0-vertex",
+ validateTargetProfile("
https://github.com/llvm-beanz approved this pull request.
I'm happy with this approach. We can adjust and iteratively address issues if
any appear.
https://github.com/llvm/llvm-project/pull/86318
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -68,25 +68,25 @@ TEST(DxcModeTest, TargetProfileValidation) {
IntrusiveRefCntPtr DiagOpts = new DiagnosticOptions();
DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagConsumer);
- validateTargetProfile("-Tvs_6_0", "dxil--shadermodel6.0-vertex",
+ validateTargetProfile("
@@ -98,9 +106,46 @@ std::optional tryParseProfile(StringRef
Profile) {
else if (llvm::getAsUnsignedInteger(Parts[2], 0, Minor))
return std::nullopt;
- // dxil-unknown-shadermodel-hull
+ // Determine DXIL version number using the minor version number of Shader
+ // Mo
@@ -12,7 +12,10 @@
#include "clang/Driver/DriverDiagnostic.h"
#include "clang/Driver/Job.h"
#include "llvm/ADT/StringSwitch.h"
+#include "llvm/Support/ErrorHandling.h"
#include "llvm/TargetParser/Triple.h"
+#include
+#include
llvm-beanz wrote:
Do we need ?
@@ -35,6 +38,11 @@ bool isLegalShaderModel(Triple &T) {
if (Version.getSubminor())
return false;
+ // DXIL Version should be set as SubArch
+ if (T.getSubArch() == Triple::NoSubArch) {
+return false;
+ }
llvm-beanz wrote:
nit:
```suggestion
if
@@ -12,7 +12,10 @@
#include "clang/Driver/DriverDiagnostic.h"
#include "clang/Driver/Job.h"
#include "llvm/ADT/StringSwitch.h"
+#include "llvm/Support/ErrorHandling.h"
llvm-beanz wrote:
This header should not be needed.
https://github.com/llvm/llvm-project/pu
@@ -98,9 +100,47 @@ std::optional tryParseProfile(StringRef
Profile) {
else if (llvm::getAsUnsignedInteger(Parts[2], 0, Minor))
return std::nullopt;
- // dxil-unknown-shadermodel-hull
+ // Determine DXIL version number using the minor version number of Shader
+ // Mo
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/89788
>From a44bb91986dcde7265666391c6aa46bc0876070d Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Tue, 23 Apr 2024 11:13:09 -0500
Subject: [PATCH 1/2] [HLSL] Correctly set `__HLSL_ENABLE_16_BIT`
The preproce
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/89788
The preprocessor define `__HLSL_ENABLE_16_BIT` should be set to 1 if native
16-bit types are enabled and not set if they are not.
Previously we were setting the value to match the HLSL active language version
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?=
Message-ID:
In-Reply-To:
@@ -3101,3 +3130,68 @@ CodeGenFunction::GenerateCapturedStmtFunction(const
CapturedStmt &S) {
return F;
}
+
+namespace {
+// Returns the first convergence entry/loop/anchor instruction found in
301 - 400 of 667 matches
Mail list logo