Commit 3e09926
committed
fix(renderer): derive SECTION_2D_UNIFORM_SLOT_COUNT from the slot index
SECTION_2D_UNIFORM_SLOT_COUNT sized the shared section-2D-overlay
uniform buffer with a hand-written 6, while SECTION_2D_UNIFORM_SLOT_INDEX
maps each draw site to its slot. Nothing tied the two together: a new
key added to the index type-checks fine (a property access needs the
key to compile) but the count doesn't grow with it, so the buffer stays
one slot short and the new draw site's bind-group offset lands one
record past the end.
Derive the count from the index instead, and pin the two equal with a
test so a future divergence fails a test rather than only surfacing as
a WebGPU validation error on the new site.
Refs #33421 parent 5a431e5 commit 3e09926
3 files changed
Lines changed: 16 additions & 2 deletions
File tree
- .changeset
- packages/renderer/src
- shaders
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
337 | 346 | | |
338 | 347 | | |
339 | 348 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
| 83 | + | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
0 commit comments