Commit bebdfbd
[Support] Use explicit inline element count for AccelerationStructureDescs SmallVectors (#1252)
## Problem
`AccelerationStructureDescs` declares its lists with the default
`SmallVector` inline element count:
```cpp
struct AccelerationStructureDescs {
llvm::SmallVector<BLASDesc> BLAS;
llvm::SmallVector<TLASDesc> TLAS;
};
```
`BLASDesc` holds a `std::string` plus two further default-inlined
`SmallVector`s (`Triangles`, `AABBs`), so its size compounds. Under
MSVC's debug STL (`/MDd`, `_ITERATOR_DEBUG_LEVEL=2`), `std::string` and
the nested inline storage grow enough that `sizeof(BLASDesc)` exceeds
256 bytes, tripping LLVM's assertion in
`CalculateSmallVectorDefaultInlinedElements`:
> You are trying to use a default number of inlined elements for
`SmallVector<T>` but `sizeof(T)` is really big! Please use an explicit
number of inlined elements with `SmallVector<T, N>` ...
This breaks any **Debug** build with MSVC on Windows (`Pipeline.h` is
included widely). Release / RelWithDebInfo builds -- including CI --
keep the types under the limit, so the failure isn't visible there.
## Fix
Give the lists an explicit inline element count, as the assertion
recommends. Only `BLASDesc` trips the assert today; `TLASDesc` has the
same shape and sits just under the threshold, so it gets the same
treatment for consistency and to avoid a latent break when fields are
added. No functional change -- this only sets inline storage capacity.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 59fc101 commit bebdfbd
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
526 | | - | |
527 | | - | |
| 526 | + | |
| 527 | + | |
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
| |||
0 commit comments