Uploaded November 2025 | Updated November 2026, 1 week ago
2025 US LLVM Developers' Meeting
llvm.org/devmtg/2025-10
------
Title: Impossible Perspectives in Data Layout
Speaker: Justin Bogner
------
Slides: llvm.org/devmtg/2025-10/slides/quick_talks/bogner.pdf
-----
In this talk, we'll discuss the challenges we faced representing constructs in HLSL that are somewhat odd compared to the usual rules of C and C++, and consider the tradeoffs of various approaches along the way. There are several contexts where HLSL doesn't match C++ in terms of layout. "CBuffers" have rules that grew out of the history of shading languages, DirectX APIs, and weird GPU hardware that result in odd alignment and padding requirements, especially for arrays. The packoffset feature of CBuffers and the vk::offset attribute which can inject arbitrary amounts of padding into a structure. Small vector types are aligned based on their element type instead of their total size. All of these need some care in how they're handled throughout the compiler. This talk will discuss the implementation, present lessons learned, and consider where these techniques are useful in other contexts.
-----
Videos Edited by Bash Films: BashFilms.com
2025 US LLVM Developers' Meeting
llvm.org/devmtg/2025-10
------
Title: Impossible Perspectives in Data Layout
Speaker: Justin Bogner
------
Slides: llvm.org/devmtg/2025-10/slides/quick_talks/bogner.pdf
-----
In this talk, we'll discuss the challenges we faced representing constructs in HLSL that are somewhat odd compared to the usual rules of C and C++, and consider the tradeoffs of various approaches along the way. There are several contexts where HLSL doesn't match C++ in terms of layout. "CBuffers" have rules that grew out of the history of shading languages, DirectX APIs, and weird GPU hardware that result in odd alignment and padding requirements, especially for arrays. The packoffset feature of CBuffers and the vk::offset attribute which can inject arbitrary amounts of padding into a structure. Small vector types are aligned based on their element type instead of their total size. All of these need some care in how they're handled throughout the compiler. This talk will discuss the implementation, present lessons learned, and consider where these techniques are useful in other contexts.
-----
Videos Edited by Bash Films: BashFilms.com










