chore: add static-assert for GPU buffers#542
Conversation
This requires all buffers that will be sent to the GPU will be aligned to size 16.
|
For people to try to see if they think it's worth having. I can't get it to fire, but maybe we can use it if we remove |
|
@coderabbitai this pr is too old and should be closed. However, let's create an issue with help wanted and unassigned to add these types of basic checks. This may not be the best solution so draft the issue in a way that doesn't require static asserts but helps solve the root issue of buffer misalignment at compile time. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chainI'll help you create an issue for compile-time buffer alignment checks. Let me first examine the current PR and codebase to better understand the context. 🏁 Script executed: Length of output: 1632 Let me examine the specific files that were modified to understand the buffer structures and alignment requirements. 🏁 Script executed: Length of output: 284 Let me explore the repository structure to find the actual location of the files and understand the buffer alignment patterns. 🏁 Script executed: Length of output: 571 Let me fix the regex and properly explore the codebase structure. 🏁 Script executed: Length of output: 1253 Let me explore the actual files in the feature directories and look for buffer-related code patterns. 🏁 Script executed: Length of output: 4305 Now let me examine some of the shader files to understand the buffer structures and alignment patterns. 🏁 Script executed: Length of output: 20104 Now I have a clear understanding of the buffer alignment concerns in this HLSL shader project. Let me create an issue that addresses the root problem of ensuring compile-time buffer alignment validation. 🏁 Script executed: Length of output: 1797 @alandtse I've created issue #1426 to address the compile-time buffer alignment validation problem. The issue focuses on the root problem of ensuring GPU buffer alignment rather than prescribing static asserts as the only solution. The issue covers:
The issue is now ready for community contributions and doesn't assume static asserts are the best approach, allowing for exploration of various solutions to solve the buffer alignment validation problem. |
This requires all buffers that will be sent to the GPU will be aligned to size 16.