Commit 02add01
Fix instancing data layout for all graphics backends. (#1656)
VertexBuffer: Always pack instance data in reverse attribute order. bgfx
maps i_data0 to the highest semantic (TEXCOORD7) in all backends, so
reverse iteration is correct universally, not just D3D11/D3D12.
ShaderCompilerTraversers: Fix OpenGL traverser to assign i_data names in
reverse order (--m_instanceAttributeCount), matching the Metal
traverser. Previously it used forward order (m_instanceAttributeIndex++)
which produced wrong attribute-to-slot mapping when combined with
reverse instance buffer packing.
ShaderCompilerTraversers: Add splatIndex0-3 to IsInstance() so Gaussian
Splatting attributes are recognized as instance data on OpenGL and
Metal.
config.json: Re-enable Gaussian Splatting tests on OpenGL and Metal now
that instancing is fixed for those backends.
Co-authored-by: Branimir Karadzic <branimirkaradzic@gmail.com>1 parent e8ee5f7 commit 02add01
3 files changed
Lines changed: 28 additions & 21 deletions
File tree
- Apps/Playground/Scripts
- Plugins
- NativeEngine/Source
- ShaderCompiler/Source
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 8 | + | |
13 | 9 | | |
14 | 10 | | |
15 | 11 | | |
16 | 12 | | |
17 | 13 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 14 | + | |
24 | 15 | | |
25 | 16 | | |
26 | 17 | | |
| |||
56 | 47 | | |
57 | 48 | | |
58 | 49 | | |
59 | | - | |
60 | 50 | | |
| 51 | + | |
61 | 52 | | |
62 | | - | |
| 53 | + | |
63 | 54 | | |
64 | 55 | | |
65 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
150 | 151 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | 152 | | |
155 | 153 | | |
156 | 154 | | |
| |||
Lines changed: 21 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
551 | | - | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
552 | 556 | | |
553 | 557 | | |
554 | 558 | | |
| |||
598 | 602 | | |
599 | 603 | | |
600 | 604 | | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
601 | 617 | | |
602 | 618 | | |
603 | 619 | | |
| |||
611 | 627 | | |
612 | 628 | | |
613 | 629 | | |
614 | | - | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
615 | 633 | | |
616 | 634 | | |
617 | 635 | | |
618 | 636 | | |
619 | 637 | | |
620 | 638 | | |
621 | | - | |
| 639 | + | |
622 | 640 | | |
623 | 641 | | |
624 | 642 | | |
| |||
0 commit comments