Commit 9da133e
committed
Fix add_pNext() dropping pNext chain elements in passed in structures
When a user provides a pNext chain to DeviceBuilder::add_pNext(),
vk-bootstrap did not look at the pNext chain of the passed in struct,
leaving to missing elements. While the library could require that each
struct must be passed in explicitly with DeviceBuilder::add_pNext(),
it isn't difficult to iterate the passed in pNext chain and grab the
pointers to the structs to build the final pNext chain with.
This commit also adds deduplication to building of the final pNext chain
so that the same struct (as in, same memory address, it doesn't take
sTypes into consideration) isn't in the chain more than once.1 parent 4551e98 commit 9da133e
4 files changed
Lines changed: 55 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
141 | 151 | | |
142 | 152 | | |
143 | 153 | | |
| |||
455 | 465 | | |
456 | 466 | | |
457 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
458 | 479 | | |
459 | 480 | | |
460 | 481 | | |
| |||
1713 | 1734 | | |
1714 | 1735 | | |
1715 | 1736 | | |
1716 | | - | |
1717 | | - | |
| 1737 | + | |
| 1738 | + | |
1718 | 1739 | | |
1719 | 1740 | | |
1720 | 1741 | | |
| |||
1766 | 1787 | | |
1767 | 1788 | | |
1768 | 1789 | | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
1769 | 1794 | | |
1770 | 1795 | | |
1771 | 1796 | | |
| |||
2168 | 2193 | | |
2169 | 2194 | | |
2170 | 2195 | | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
2171 | 2200 | | |
2172 | 2201 | | |
2173 | 2202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
820 | 820 | | |
821 | 821 | | |
822 | 822 | | |
823 | | - | |
| 823 | + | |
824 | 824 | | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
829 | 828 | | |
830 | 829 | | |
831 | 830 | | |
| |||
978 | 977 | | |
979 | 978 | | |
980 | 979 | | |
981 | | - | |
982 | | - | |
983 | | - | |
984 | | - | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
985 | 983 | | |
986 | 984 | | |
987 | 985 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
198 | 201 | | |
199 | 202 | | |
| 203 | + | |
200 | 204 | | |
201 | 205 | | |
202 | 206 | | |
203 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
204 | 217 | | |
205 | 218 | | |
206 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
0 commit comments