Skip to content

[21.2] Fix previous matrix shader compilation errors with Hybrid Renderer #5691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 17, 2021

Conversation

vincent-breysse
Copy link
Contributor

@vincent-breysse vincent-breysse commented Sep 16, 2021

Purpose of this PR

Fixes previous matrix shader compilation errors with hybrid renderer. Hybrid renderer tests with SRP have been disabled for 2021 because hybrid renderer did not support 2021 Unity versions. So it seems that someone broke our code without noticing, since part of the CI was disabled.

The main issues were that :

  • Previous matrices metadata wasn't defined with HDRP, which is needed by hybrid renderer
  • unity_MatrixPreviousM and unity_MatrixPreviousMI were redefined, which caused issues when expanding the (recently added) macros UNITY_PREV_MATRIX_M and UNITY_PREV_MATRIX_I_M. Those were added on July the 28th as part of this PR https://github.com/Unity-Technologies/Graphics/pull/4190/files

Testing status

Validated normal GameObjects code by testing a few scenes in TestProjects/HDRP_Tests and TestProjects/UniversalGraphicsTest_Lighting

Could not test with DOTS directly since there is no editor compatible with DOTS + SRP 12. I could only manually test the changes on our development branch for HRNext, which is based on 2022.1 + SRP 13.

Changelog

com.unity.render-pipelines.high-definition

  • Fixed : Shader compilation errors in the DOTS_INSTANCING_ON variants

  • com.unity.render-pipelines.universal

  • Fixed : Shader compilation errors in the DOTS_INSTANCING_ON variants

# Conflicts:
#	com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl
@vincent-breysse vincent-breysse requested review from a team as code owners September 16, 2021 14:07
@github-actions
Copy link

Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed.
Link to Yamato: https://yamato.cds.internal.unity3d.com/jobs/902-Graphics
Search for your PR branch using the sidebar on the left, then add the following segment(s) to the end of the URL (you may need multiple tabs depending on how many packages you change)

HDRP
/.yamato%252Fall-hdrp.yml%2523PR_HDRP_2021.2

URP
/.yamato%252Fall-urp.yml%2523PR_URP_2021.2

Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure.

@sebastienlagarde sebastienlagarde merged commit 4072e1f into 2021.2/staging Sep 17, 2021
@sebastienlagarde sebastienlagarde deleted the 21.2/hrv2-fix-prev-matrix branch September 17, 2021 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants