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

Avoid nested structs in the types used to pass data from vertex to fragment shader functions #1

Merged
merged 1 commit into from
Mar 29, 2021

Conversation

maxbrunsfeld
Copy link
Collaborator

@maxbrunsfeld maxbrunsfeld commented Mar 29, 2021

This seems to be required in order for the shaders to compile successfully on macOS versions <= 10.15 (Catalina). In these versions, when nested structs are used, we get errors like this:

for vertex function return types:

  metal shader compilation failed:
  ./src/platform/mac/shaders/shaders.metal:40:8: error: invalid return type 'QuadFragmentInput' for vertex function
  vertex QuadFragmentInput quad_vertex(
         ^
  ./src/platform/mac/shaders/shaders.metal:37:5: note: field of illegal type 'GPUIQuad' declared here
      GPUIQuad quad;
      ^

for fragment function inputs:

  ./src/platform/mac/shaders/shaders.metal:59:5: error: invalid type 'QuadFragmentInput' of input declaration with attribute 'stage_in' in a fragment function
      QuadFragmentInput input [[stage_in]]
      ^
  ./src/platform/mac/shaders/shaders.metal:37:5: note: field of illegal type 'GPUIQuad' declared here
      GPUIQuad quad;
      ^

This is required to compile successfully on macos versions <= 10.15 (catalina)
@as-cii as-cii merged commit a949959 into master Mar 29, 2021
@as-cii as-cii deleted the catalina-mps-compatibility branch March 29, 2021 07:16
@as-cii
Copy link
Member

as-cii commented Mar 29, 2021

Pretty weird error but excellent work figuring this out! ⚡

leizaf pushed a commit to leizaf/zed that referenced this pull request Jan 26, 2024
gabydd pushed a commit to gabydd/zed that referenced this pull request Feb 26, 2024
linux/x11: Move from dedicated thread to fd source for event loop
@JosephTLyons JosephTLyons mentioned this pull request Mar 5, 2024
1 task
d1y pushed a commit to d1y/zed1 that referenced this pull request Jun 25, 2024
Set up ground work for debugger config files
@DevLord261 DevLord261 mentioned this pull request Jul 12, 2024
1 task
This was referenced Aug 11, 2024
@drdozer drdozer mentioned this pull request Oct 15, 2024
1 task
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