SRP Repository Migration

THIS REPOSITORY HAS MOVED
tl;dr As of April 6 2020 the old SRP repository is no longer in use or maintained. Please migrate to using the new repository: GitHub - Unity-Technologies/Graphics: Unity Graphics - Including Scriptable Render Pipeline

When the first commit was made in the ScriptableRenderPipeline repo on April 30, 2013 almost 7 years ago, nobody really knew what it would turn into. And here we are 13,000+ commits later and the SRP repo is an integral part of all new graphics systems at Unity, and serves as the source of both the HighDefinitionRenderPipeline and the UniversalRenderPipeline packages.

However, dust and unwanted artefacts have been gathering in all corners of the repo, which has led to some less than desirable cloning times with an average clone taking more than 15 minutes. Given the fact that the repo is at the core of many graphics tests at Unity and is cloned more than a thousand times per day by our CI systems, this leads to a lot of wasted time. Time that we want to reclaim.

Because of that we have created a new repository with an entirely rewritten history with all new SHAs and LFs enabled. Also since the original scope has changed a lot we simply call that repository Graphics.

So, here is the plan going forward:
We will be taking the public ScriptableRenderPipeline repository offline for backup for the next few days to ensure that we do not lose any data. The new public Graphics repository is the only one that will be getting updates from this day and forward.

Migration Steps:
The new repository is located at GitHub - Unity-Technologies/Graphics: Unity Graphics - Including Scriptable Render Pipeline.

If you are simply looking at the code and the branches we have, there is no need to do anything complicated. You just need to clone the repository and delete the old one from your computer.

Are you working directly on the repository? If you have been working in the SRP repository there are two possible steps needed to take.

Did you have all of your branches already pushed?
If so then those branches will exist on the new repository already. Feel free to pull them and continue working.

I have some changes locally that I have not pushed
You will need to manually apply these changes on top of the new repository. You can do this either by manually applying a patch, or by rebasing. One very important thing - do NOT merge the two repositories together as it will lead to a very very broken history.

Are you working on a fork?
Do you have a private fork of SRP you are using? You will need to migrate over to the new repository. There are a number of ways to do this depending on how you have made changes in your fork.

“I am working right in my forks master and merging in Unity master whenever I feel I want to update”
It will be difficult to migrate and also preserve history, you will need to either cherry pick your individual commits across to the new repository or do diff and make a single commit with this diff.

“I am working on a branch and continually rebase my changes on Unity master whenever I feel I want to update”
You will need to create a new fork of the new repository then clone your new fork. Next, set your old fork as a remote and rebase your old branch from your old fork on top of master (or release branch) in your new fork

5 Likes

Hey there @Tim-C !
I may have found a weird bug and I’m unsure where to post this since it’s GitHub related, so here goes :slight_smile:

I use the “Clone or Download” green button and “Download ZIP” with the new Graphics repo, and it seems the zipping process corrupts some files.

Inside the downloaded Graphics-master.zip, the file com.unity.render-pipelines.core\Editor\ShaderGenerator\ICSharpCode.NRefactory.dll only weighs 1 KB.

Inside the downloaded ScriptableRenderPipeline-master.zip (from before the migration), the file com.unity.render-pipelines.core\Editor\ShaderGenerator\ICSharpCode.NRefactory.dll weighs 516 KB.

It also seems to mess up a couple of .png files! Can’t open them in an image authoring software and getting a lot of Errors when opening in Unity, similar to this:

Could not create asset from Packages/com.unity.render-pipelines.universal/Textures/FilmGrain/Medium01.png: File could not be read

New Graphics repo uses Git LFS so I don’t think the Download ZIP will work (afaik it’s never worked with LFS, you really need to clone the repo with git lfs compatible setup). This explains the broken binary files you’ve seen on the ZIP option.

What 0lento says is correct:

This appears to have broken the submodule link in GitHub - alelievr/HDRP-Custom-Passes: A bunch of custom passes made for HDRP, which is used in the Unity documentation. That repo can no longer be cloned as-is for following the docs.

@Tim-C would be great if you can update the above notice with what the current plan regarding https://github.com/Unity-Technologies/ScriptableRenderPipeline is - “offline for the next days” isn’t up-to-date I’d assume :slight_smile: