|
| 1 | +# How to update the DXC module |
| 2 | + |
| 3 | +## FIRST TIME SETUP: Make sure you have the correct remotes! |
| 4 | + |
| 5 | +The following submodules as initialized on your system should have `origin` pointing at the `[email protected]:Devsh-Graphics-Programming` fork. |
| 6 | + |
| 7 | +Then a remote `Khronos` for the SPIR-V submodules, and `Microsoft` for the DXC. |
| 8 | + |
| 9 | +If they don't then you can correct that with `git remote add [RemoteName] [email protected]:[Organisation]/[Repo-Name].git` and `git remote remove [RemoteName]` |
| 10 | + |
| 11 | +## IF YOU GET `There is no tracking information for the current branch` |
| 12 | + |
| 13 | +just make the branch track the origin |
| 14 | +``` |
| 15 | +git branch --set-upstream-to=origin/[BranchName] [BranchName] |
| 16 | +``` |
| 17 | + |
| 18 | +## Its Basically an Depth First Search with a Prologue and Epilogue |
| 19 | + |
| 20 | +``` |
| 21 | +checkout correct branch HEAD |
| 22 | +[optional] Merge latest stuff from original project |
| 23 | +recurse() |
| 24 | +commit |
| 25 | +push |
| 26 | +``` |
| 27 | + |
| 28 | +### First make sure you're on some Nabla branch Head |
| 29 | + |
| 30 | +Just `git pull` and make sure you're tracking a branch. |
| 31 | + |
| 32 | +### Make sure DXC is tracked and pointing at HEAD |
| 33 | + |
| 34 | +``` |
| 35 | +cd ./3rdparty/dxc/dxc |
| 36 | +git fetch |
| 37 | +git checkout devshFixes |
| 38 | +git pull |
| 39 | +``` |
| 40 | + |
| 41 | +### SPIR-V Headers: track & get latest head, merge latest upstream, commit and push |
| 42 | + |
| 43 | +``` |
| 44 | +cd ./external/SPIRV-Headers |
| 45 | +git fetch |
| 46 | +git checkout header_4_hlsl |
| 47 | +git pull |
| 48 | +git pull Khronos main |
| 49 | +git commit -m "latest Khronos `main` merge" |
| 50 | +git push |
| 51 | +``` |
| 52 | + |
| 53 | +### SPIR-V Tools: track & get latest head, merge latest upstream, commit and push |
| 54 | + |
| 55 | +``` |
| 56 | +cd ../SPIRV-Tools |
| 57 | +git fetch |
| 58 | +git checkout main |
| 59 | +git pull |
| 60 | +git pull Khronos main |
| 61 | +git commit -m "latest Khronos `main` merge" |
| 62 | +git push |
| 63 | +``` |
| 64 | + |
| 65 | +### Back to DXC and commit the submodule pointer changes |
| 66 | + |
| 67 | +``` |
| 68 | +cd .. |
| 69 | +git add . |
| 70 | +git commit -m "Update SPIR-V Headers and Tools" |
| 71 | +cd .. |
| 72 | +[optional] git pull Microsoft main |
| 73 | +[optional] git commit -m "merge upstream from Microsoft" |
| 74 | +git push |
| 75 | +``` |
| 76 | + |
| 77 | +The reason the upstream from Microsoft is optional is because it might break our Clang hacks like: |
| 78 | +- abuse of `__decltype` |
| 79 | +- `inout` working like a reference, but only sometimes |
| 80 | +- abuse of reference type |
| 81 | + |
| 82 | +### Finally commit the change of DXC commit pointer to Nabla |
| 83 | + |
| 84 | +``` |
| 85 | +cd .. |
| 86 | +git add dxc |
| 87 | +git commit -m "Updated DXC" |
| 88 | +git push |
| 89 | +``` |
0 commit comments