Commit a29145e
authored
[SPIR-V] Fix resource heap & fvk-bind-register interactions (microsoft#7858)
The interaction between `-fvk-bind-register` and the resource/sampler
heaps were not tested, and broken.
This commit solves this by requiring the `-fvk-bind-sampler-heap` or
`-fvk-bind-resource-heap` flag to be used if the `-fvk-bind-register`
flag is present and a resource/sampler heap is present.
An alternative solution would be to allow implicit bindings on heaps
while other resources require the register attribute, but I think it
would be less useful as the goal of using this flag is to have full
control over the bindings.
This commit refactorizes a bit the helper functions
isResourceHeap/isSamplerHeap, but this part is NFC. The main bit is in
DeclResultIdMapper, where a special case is added the the heaps.
Fixes microsoft#78571 parent f930c1d commit a29145e
8 files changed
Lines changed: 100 additions & 23 deletions
File tree
- tools/clang
- include/clang/SPIRV
- lib/SPIRV
- test/CodeGenSPIRV
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
| 226 | + | |
226 | 227 | | |
227 | 228 | | |
228 | | - | |
| 229 | + | |
| 230 | + | |
229 | 231 | | |
230 | 232 | | |
231 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
995 | 995 | | |
996 | 996 | | |
997 | 997 | | |
998 | | - | |
999 | | - | |
1000 | | - | |
1001 | | - | |
1002 | | - | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
1003 | 1001 | | |
1004 | 1002 | | |
1005 | | - | |
1006 | | - | |
1007 | | - | |
1008 | | - | |
1009 | | - | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
1010 | 1016 | | |
1011 | 1017 | | |
1012 | 1018 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1850 | 1850 | | |
1851 | 1851 | | |
1852 | 1852 | | |
1853 | | - | |
1854 | | - | |
| 1853 | + | |
1855 | 1854 | | |
1856 | 1855 | | |
1857 | 1856 | | |
| |||
2517 | 2516 | | |
2518 | 2517 | | |
2519 | 2518 | | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
2520 | 2533 | | |
2521 | 2534 | | |
2522 | 2535 | | |
2523 | 2536 | | |
2524 | 2537 | | |
2525 | 2538 | | |
2526 | 2539 | | |
| 2540 | + | |
| 2541 | + | |
2527 | 2542 | | |
2528 | 2543 | | |
2529 | 2544 | | |
2530 | 2545 | | |
2531 | | - | |
2532 | 2546 | | |
2533 | 2547 | | |
2534 | 2548 | | |
| |||
2669 | 2683 | | |
2670 | 2684 | | |
2671 | 2685 | | |
2672 | | - | |
2673 | | - | |
| 2686 | + | |
| 2687 | + | |
2674 | 2688 | | |
2675 | 2689 | | |
2676 | 2690 | | |
| |||
2755 | 2769 | | |
2756 | 2770 | | |
2757 | 2771 | | |
2758 | | - | |
2759 | | - | |
| 2772 | + | |
| 2773 | + | |
2760 | 2774 | | |
2761 | 2775 | | |
2762 | 2776 | | |
| |||
2791 | 2805 | | |
2792 | 2806 | | |
2793 | 2807 | | |
2794 | | - | |
2795 | | - | |
| 2808 | + | |
| 2809 | + | |
2796 | 2810 | | |
2797 | 2811 | | |
2798 | 2812 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | | - | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
55 | 64 | | |
56 | 65 | | |
57 | | - | |
| 66 | + | |
58 | 67 | | |
59 | 68 | | |
60 | 69 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments