Skip to content
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

Fix: 'internal error: no storage type for block output' #105

Merged
merged 3 commits into from
Nov 10, 2022

Conversation

reveriejake
Copy link
Contributor

Fixes errors which appear when loading in state data through variables.

Works on my end. Please double check before accepting pull request.

Original solution provided by: https://github.com/Akeyn

Fixes errors which appear when loading in state data through variables.

Original solution provided by: https://github.com/Akeyn
@reveriejake
Copy link
Contributor Author

I tried to play it safe with defines. Let me know if this is not necessary. Not sure how universal [flatten] and [unroll()] are.

@Auburn
Copy link
Owner

Auburn commented Nov 10, 2022

Does unity have any defines that can be checked to enable this?

@reveriejake
Copy link
Contributor Author

reveriejake commented Nov 10, 2022

I've tried a few of the Unity defines but they didn't seem to get recognized. I didn't see any HLSL specific directives that would work either. I could be wrong, I will keep an eye out for that.

If these [flatten] and [unroll()] tags solve Unity specific errors, it might make more sense to rename ENABLE_FLATTEN to UNITY_ENGINE or something.

@Auburn
Copy link
Owner

Auburn commented Nov 10, 2022

Were you having the issue outside of Unity?

@reveriejake
Copy link
Contributor Author

I haven't tested it outside of Unity, but I can try Unreal either tonight or sometime this weekend to see if it suffers a similar issue.

@Auburn
Copy link
Owner

Auburn commented Nov 10, 2022

I'm not too worried about testing other compilers, I think everyone who reported the issue has been using Unity. I just thought from your wording that you weren't using Unity.

According to this: https://docs.unity3d.com/Manual/SL-PragmaDirectives.html

UNITY_VERSION is defined

@reveriejake
Copy link
Contributor Author

Hmm, I must have overlooked the UNITY_VERSION define on that page, I did a quick skim. I just tried it out and this one seems to have worked.

@Auburn
Copy link
Owner

Auburn commented Nov 10, 2022

Instead of the current defines could you change it to this:

#define FNL_FLATTEN [flatten]
#define FNL_UNROLL [unroll(1)]

and define them as empty when not on Unity, assuming empty defines are allowed on HLSL?

I think that would be a bit cleaner and easier to read

@reveriejake
Copy link
Contributor Author

reveriejake commented Nov 10, 2022

Yep I was just working on that. Here is what I put instead.

#if UNITY_VERSION
  #define FNL_FLATTEN [flatten]
  #define FNL_UNROLL [unroll(1)]
#else
  #define FNL_FLATTEN
  #define FNL_UNROLL
#endif

Leaving the #else off causes issues in Unity when not included. So not sure if that is an issue, so I included the #else.

(Having a terrible time with this 'code' thing here haha

Added better defines for the 'internal error: no storage type for block output' issue in Unity.
@reveriejake
Copy link
Contributor Author

All changes have been pushed

@@ -47,7 +47,7 @@
// VERSION: 1.0.1
// https://github.com/Auburn/FastNoise

// Switch between using floats or doubles for input position
// [flatten] switch between using floats or doubles for input position
Copy link
Owner

Choose a reason for hiding this comment

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

This looks like an overzealous find and replace

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're too good at this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At least it was commented out ;). Let me restore that line.

@Auburn Auburn merged commit 95900f7 into Auburn:master Nov 10, 2022
@Auburn
Copy link
Owner

Auburn commented Nov 10, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants