[clang] Create Texture Dimension attribute in HLSL (PR #104239)

2024-08-29 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 converted_to_draft https://github.com/llvm/llvm-project/pull/104239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Create Texture Dimension attribute in HLSL (PR #104239)

2024-08-23 Thread Damyan Pepper via cfe-commits
damyanp wrote: We should get the proposal approved before implementing it. https://github.com/llvm/llvm-project/pull/104239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Create Texture Dimension attribute in HLSL (PR #104239)

2024-08-23 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/104239 >From aaa455933d3703b84634703fd4fcb5c815aa139e Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 14 Aug 2024 14:02:22 -0700 Subject: [PATCH 1/4] create texture dimension attr --- clang/include/clang/Ba

[clang] Create Texture Dimension attribute in HLSL (PR #104239)

2024-08-21 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/104239 >From aaa455933d3703b84634703fd4fcb5c815aa139e Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 14 Aug 2024 14:02:22 -0700 Subject: [PATCH 1/4] create texture dimension attr --- clang/include/clang/Ba

[clang] Create Texture Dimension attribute in HLSL (PR #104239)

2024-08-21 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s + + +// CHECK: -HLSLTextureDimensionAttr 0x{{[0-9a-f]+}} 1 +struct [[hlsl::texture_dimension(1)]] Eg1 { bob80905 wrote: Yes, buffer resources won

[clang] Create Texture Dimension attribute in HLSL (PR #104239)

2024-08-21 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/104239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Create Texture Dimension attribute in HLSL (PR #104239)

2024-08-21 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/104239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Create Texture Dimension attribute in HLSL (PR #104239)

2024-08-21 Thread Xiang Li via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s + + +// CHECK: -HLSLTextureDimensionAttr 0x{{[0-9a-f]+}} 1 +struct [[hlsl::texture_dimension(1)]] Eg1 { python3kgae wrote: Should we limit this a

[clang] Create Texture Dimension attribute in HLSL (PR #104239)

2024-08-21 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/104239 >From aaa455933d3703b84634703fd4fcb5c815aa139e Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 14 Aug 2024 14:02:22 -0700 Subject: [PATCH 1/3] create texture dimension attr --- clang/include/clang/Ba

[clang] Create Texture Dimension attribute in HLSL (PR #104239)

2024-08-21 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/104239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Create Texture Dimension attribute in HLSL (PR #104239)

2024-08-15 Thread Justin Bogner via cfe-commits
bogner wrote: > You're right, a single integer won't be able to match to all those dimension > kinds. I propose we make an enum, much like llvm::ResourceKind, called > TextureDimensionKind, that enumerates all the texture kinds you listed above. > Then I can make the attribute take a single en

[clang] Create Texture Dimension attribute in HLSL (PR #104239)

2024-08-15 Thread Damyan Pepper via cfe-commits
damyanp wrote: D3D at least tends to view "buffer" as another type of resource dimension. Wonder if this should be included, rather than having to assume that omission of the attribute means it must be a buffer. https://github.com/llvm/llvm-project/pull/104239

[clang] Create Texture Dimension attribute in HLSL (PR #104239)

2024-08-14 Thread Joshua Batista via cfe-commits
bob80905 wrote: > What is this attribute supposed to mean? I think we need some design here > before we create the attribute, as it isn't clear to me that a single integer > covers our needs. The texture kinds that need to be representable by this and > whatever other attributes we design are

[clang] Create Texture Dimension attribute in HLSL (PR #104239)

2024-08-14 Thread Justin Bogner via cfe-commits
bogner wrote: What is this attribute supposed to mean? I think we need some design here before we create the attribute, as it isn't clear to me that a single integer covers our needs. The texture kinds that need to be representable by this and whatever other attributes we design are 1D, 2D, 3D

[clang] Create Texture Dimension attribute in HLSL (PR #104239)

2024-08-14 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/104239 >From aaa455933d3703b84634703fd4fcb5c815aa139e Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 14 Aug 2024 14:02:22 -0700 Subject: [PATCH 1/2] create texture dimension attr --- clang/include/clang/Ba

[clang] Create Texture Dimension attribute in HLSL (PR #104239)

2024-08-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joshua Batista (bob80905) Changes This PR creates a new attribute in HLSL, "TextureDimension", which specifies the dimension of a specific texture resource. This PR is another necessary part of completing https://github.com/llvm/llvm-pro

[clang] Create Texture Dimension attribute in HLSL (PR #104239)

2024-08-14 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 created https://github.com/llvm/llvm-project/pull/104239 This PR creates a new attribute in HLSL, "TextureDimension", which specifies the dimension of a specific texture resource. This PR is another necessary part of completing https://github.com/llvm/llvm-project/