Skip to content

Fix compile issue on vulkan when a min16float4 is generated and shouldn't #1842

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 4 commits into from
Oct 8, 2020

Conversation

FrancescoC-unity
Copy link
Contributor

This is a tentative fix for https://fogbugz.unity3d.com/f/cases/1267920/ , I say tentative as I wasn't able to repro, but the fix would be this.

For QA: It would be great if you could find a way to repro the issue and then see if this fixes it as I was unable to.

@github-actions
Copy link

It appears that you made a non-draft PR!
Please convert your PR to draft (button on the right side of the page)
and cancel any jobs that started on Yamato.
See the PR template for more information.
Thank you!

@@ -48,7 +48,6 @@ struct HDShadowData
public Vector4 zBufferParam;
public Vector4 shadowMapSize;

[SurfaceDataAttributes(precision = FieldPrecision.Real)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding @jessebarker as I guess he may be the one who have done this change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I added it (hard to tell - git says that line was last edited by you :-) ). The only issue I can think of is whether both C# and the generated shader struct understand the data as being the same type/layout. Shouldn't be a problem to take "Real" precision away.

Copy link
Contributor

@jessebarker jessebarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -48,7 +48,6 @@ struct HDShadowData
public Vector4 zBufferParam;
public Vector4 shadowMapSize;

[SurfaceDataAttributes(precision = FieldPrecision.Real)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I added it (hard to tell - git says that line was last edited by you :-) ). The only issue I can think of is whether both C# and the generated shader struct understand the data as being the same type/layout. Shouldn't be a problem to take "Real" precision away.

Copy link
Contributor

@TomasKiniulis TomasKiniulis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FrancescoC-unity I repro the issue, and it's still present with your fix.

Following Gytis steps seems to work for me. What I did was:

  1. Open HDRP_Tests project with -force-vulkan -force-xr command line arguments
  2. Open 4013_TrasnparentMotionVector scene
  3. Mark HDRP_Test_Camera as XR Compatible
  4. Run the scene through test runner
  5. Unhandled log message: '[Error] Shader error in 'Shader Graphs/SG_Fabric_TransparentWithMotionVector': '' : compilation terminated at line 1103 (on vulkan) shows up

Note that the error shows up only once running the test scene and project has to be reopened and test rerun for shader error to appear again

@FrancescoC-unity
Copy link
Contributor Author

FrancescoC-unity commented Sep 17, 2020

@FrancescoC-unity I repro the issue, and it's still present with your fix.

Following Gytis steps seems to work for me. What I did was:

  1. Open HDRP_Tests project with -force-vulkan -force-xr command line arguments
  2. Open 4013_TrasnparentMotionVector scene
  3. Mark HDRP_Test_Camera as XR Compatible
  4. Run the scene through test runner
  5. Unhandled log message: '[Error] Shader error in 'Shader Graphs/SG_Fabric_TransparentWithMotionVector': '' : compilation terminated at line 1103 (on vulkan) shows up

Note that the error shows up only once running the test scene and project has to be reopened and test rerun for shader error to appear again

That's what I did and failed to repro :( In any case I reopend the bug and bounced back to aleksandr that pointed as this as a possible fix.

Keeping this PR on hold until we don't have info on it.

@FrancescoC-unity FrancescoC-unity changed the title Fix compile issue on vulkan when a min16float4 is generated and shouldn't [ON HOLD] Fix compile issue on vulkan when a min16float4 is generated and shouldn't Sep 17, 2020
Copy link
Contributor

@TomasKiniulis TomasKiniulis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes, due to compile issue still reproducible

@FrancescoC-unity FrancescoC-unity changed the title [ON HOLD] Fix compile issue on vulkan when a min16float4 is generated and shouldn't Fix compile issue on vulkan when a min16float4 is generated and shouldn't Oct 8, 2020
@sebastienlagarde sebastienlagarde merged commit 441a999 into HDRP/staging Oct 8, 2020
@sebastienlagarde sebastienlagarde deleted the HDRP/fix-vulkan-compile-issue branch October 8, 2020 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants