<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/lib/CodeGen/HLSLBufferLayoutBuilder.cpp, branch users/nico/python-1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[HLSL] Desugar ConstantArrayType when calculating cbuffer field layout (#134683)</title>
<updated>2025-04-07T22:25:47+00:00</updated>
<author>
<name>Sarah Spall</name>
<email>sarahspall@microsoft.com</email>
</author>
<published>2025-04-07T22:25:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=01bc672b8a41774feff445b07e749262597501e4'/>
<id>01bc672b8a41774feff445b07e749262597501e4</id>
<content type='text'>
When calculating the layout for a cbuffer field, if that field is a
ConstantArrayType, desguar it before casting it to a ConstantArrayType.
Closes #134668

---------

Co-authored-by: Eli Friedman &lt;efriedma@quicinc.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When calculating the layout for a cbuffer field, if that field is a
ConstantArrayType, desguar it before casting it to a ConstantArrayType.
Closes #134668

---------

Co-authored-by: Eli Friedman &lt;efriedma@quicinc.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Reland [Clang][Cmake] fix libtool duplicate member name warnings" (#134656)</title>
<updated>2025-04-07T14:00:53+00:00</updated>
<author>
<name>Farzon Lotfi</name>
<email>farzonlotfi@microsoft.com</email>
</author>
<published>2025-04-07T14:00:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=82103dfae9b9ee03f8935f1c8987c7eaecbe9359'/>
<id>82103dfae9b9ee03f8935f1c8987c7eaecbe9359</id>
<content type='text'>
Reverts llvm/llvm-project#133850</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#133850</pre>
</div>
</content>
</entry>
<entry>
<title>Reland [Clang][Cmake] fix libtool duplicate member name warnings (#133850)</title>
<updated>2025-04-07T13:53:07+00:00</updated>
<author>
<name>Farzon Lotfi</name>
<email>farzonlotfi@microsoft.com</email>
</author>
<published>2025-04-07T13:53:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0d71d9ab28d626e85a0085a50ff634f76a950ce0'/>
<id>0d71d9ab28d626e85a0085a50ff634f76a950ce0</id>
<content type='text'>
fixes https://github.com/llvm/llvm-project/issues/133199

As of the third commit the fix to the linker missing references in
`Targets/DirectX.cpp` found in
https://github.com/llvm/llvm-project/pull/133776 was fixed by moving
`HLSLBufferLayoutBuilder.cpp` to `clang/lib/CodeGen/Targets/`.

It fixes the circular reference issue found in
https://github.com/llvm/llvm-project/pull/133619 for all
`-DBUILD_SHARED_LIBS=ON` builds by removing `target_link_libraries` from
the sub directory cmake files.

testing for amdgpu offload was done via
`cmake -B ../llvm_amdgpu -S llvm -GNinja -C
offload/cmake/caches/Offload.cmake -DCMAKE_BUILD_TYPE=Release`

PR https://github.com/llvm/llvm-project/pull/132252 Created a second
file that shared &lt;TargetName&gt;.cpp in clang/lib/CodeGen/CMakeLists.txt

For example There were two AMDGPU.cpp's one in TargetBuiltins and the
other in Targets. Even though these were in different directories
libtool warns that it might not distinguish them because they share the
same base name.

There are two potential fixes. The easy fix is to rename one of them and
keep one cmake file. That solution though doesn't future proof this
problem in the event of a third &lt;TargetName&gt;.cpp and it seems teams want
to just use the target name

https://github.com/llvm/llvm-project/pull/132252#issuecomment-2758178483.

The alternative fix that this PR went with is to seperate the cmake
files into their own sub directories as static libs.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fixes https://github.com/llvm/llvm-project/issues/133199

As of the third commit the fix to the linker missing references in
`Targets/DirectX.cpp` found in
https://github.com/llvm/llvm-project/pull/133776 was fixed by moving
`HLSLBufferLayoutBuilder.cpp` to `clang/lib/CodeGen/Targets/`.

It fixes the circular reference issue found in
https://github.com/llvm/llvm-project/pull/133619 for all
`-DBUILD_SHARED_LIBS=ON` builds by removing `target_link_libraries` from
the sub directory cmake files.

testing for amdgpu offload was done via
`cmake -B ../llvm_amdgpu -S llvm -GNinja -C
offload/cmake/caches/Offload.cmake -DCMAKE_BUILD_TYPE=Release`

PR https://github.com/llvm/llvm-project/pull/132252 Created a second
file that shared &lt;TargetName&gt;.cpp in clang/lib/CodeGen/CMakeLists.txt

For example There were two AMDGPU.cpp's one in TargetBuiltins and the
other in Targets. Even though these were in different directories
libtool warns that it might not distinguish them because they share the
same base name.

There are two potential fixes. The easy fix is to rename one of them and
keep one cmake file. That solution though doesn't future proof this
problem in the event of a third &lt;TargetName&gt;.cpp and it seems teams want
to just use the target name

https://github.com/llvm/llvm-project/pull/132252#issuecomment-2758178483.

The alternative fix that this PR went with is to seperate the cmake
files into their own sub directories as static libs.</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL] Fix codegen to support classes in `cbuffer` (#132828)</title>
<updated>2025-03-31T17:05:59+00:00</updated>
<author>
<name>Helena Kotas</name>
<email>hekotas@microsoft.com</email>
</author>
<published>2025-03-31T17:05:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dcc2faecd8aebc64eb541aebe0005ecceffef558'/>
<id>dcc2faecd8aebc64eb541aebe0005ecceffef558</id>
<content type='text'>
Fixes #132309</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #132309</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL] Implement explicit layout for default constant buffer ($Globals) (#128991)</title>
<updated>2025-03-13T05:35:07+00:00</updated>
<author>
<name>Helena Kotas</name>
<email>hekotas@microsoft.com</email>
</author>
<published>2025-03-13T05:35:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=73e12de062c17eddfa08f61ba8f44a20fa912f1b'/>
<id>73e12de062c17eddfa08f61ba8f44a20fa912f1b</id>
<content type='text'>
Processes `HLSLResourceBindingAttr` attributes that represent
`register(c#)` annotations on default constant buffer declarations and
applies its value to the buffer layout. Any default buffer declarations
without an explicit `register(c#)` annotation are placed after the
elements with explicit layout.

This PR also adds a test case for a `cbuffer` that does not have
`packoffset` on all declarations. Same layout rules apply here as well.

Fixes #126791</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Processes `HLSLResourceBindingAttr` attributes that represent
`register(c#)` annotations on default constant buffer declarations and
applies its value to the buffer layout. Any default buffer declarations
without an explicit `register(c#)` annotation are placed after the
elements with explicit layout.

This PR also adds a test case for a `cbuffer` that does not have
`packoffset` on all declarations. Same layout rules apply here as well.

Fixes #126791</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL] add parentheses in assertion to eliminate -Wparentheses warning (#128246)</title>
<updated>2025-02-21T23:56:38+00:00</updated>
<author>
<name>Oleksandr T.</name>
<email>oleksandr.tarasiuk@outlook.com</email>
</author>
<published>2025-02-21T23:56:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7cfab6c4eb93f479e024f73647d86f9fc7f4b73f'/>
<id>7cfab6c4eb93f479e024f73647d86f9fc7f4b73f</id>
<content type='text'>
Fixes #128210</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #128210</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL] Constant Buffers CodeGen (#124886)</title>
<updated>2025-02-20T18:32:14+00:00</updated>
<author>
<name>Helena Kotas</name>
<email>hekotas@microsoft.com</email>
</author>
<published>2025-02-20T18:32:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=19af8581d51b8144f6d041ae1d948443084d8d0b'/>
<id>19af8581d51b8144f6d041ae1d948443084d8d0b</id>
<content type='text'>
Translates `cbuffer` declaration blocks to `target("dx.CBuffer")` type. Creates global variables in `hlsl_constant` address space for all `cbuffer` constant and adds metadata describing which global constant belongs to which constant buffer. For explicit constant buffer layout information an explicit layout type `target("dx.Layout")` is used. This might change in the future.

The constant globals are temporary and will be removed in upcoming pass that will translate `load` instructions in the `hlsl_constant` address space to constant buffer load intrinsics calls off a CBV handle (#124630, #112992).

See [Constant buffer design
doc](https://github.com/llvm/wg-hlsl/pull/94) for more details.

Fixes #113514, #106596</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Translates `cbuffer` declaration blocks to `target("dx.CBuffer")` type. Creates global variables in `hlsl_constant` address space for all `cbuffer` constant and adds metadata describing which global constant belongs to which constant buffer. For explicit constant buffer layout information an explicit layout type `target("dx.Layout")` is used. This might change in the future.

The constant globals are temporary and will be removed in upcoming pass that will translate `load` instructions in the `hlsl_constant` address space to constant buffer load intrinsics calls off a CBV handle (#124630, #112992).

See [Constant buffer design
doc](https://github.com/llvm/wg-hlsl/pull/94) for more details.

Fixes #113514, #106596</pre>
</div>
</content>
</entry>
</feed>
