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

[spirv] Forward declaration of function inside another. #3310

Merged
merged 2 commits into from Dec 10, 2020

Conversation

ehsannas
Copy link
Contributor

@ehsannas ehsannas commented Dec 9, 2020

Fixes #3214.

@ehsannas ehsannas added the spirv Work related to SPIR-V label Dec 9, 2020
@ehsannas ehsannas requested a review from jaebaek December 9, 2020 21:12
@ehsannas ehsannas self-assigned this Dec 9, 2020
@AppVeyorBot
Copy link


// CHECK: OpFunctionCall %float %MulBy2 %param_var_f
return float4(MulBy2(.25), 1, 0, 1);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it handle the following case?

struct foo
{
  ...
  float4 memberFunction() {
    float MulBy2(float f);
    return float4(MulBy2(.25), 1, 0, 1);
  }
};

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it works. I've added this to the test.

Copy link
Collaborator

@jaebaek jaebaek left a comment

Choose a reason for hiding this comment

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

LGTM

@AppVeyorBot
Copy link

@ehsannas ehsannas merged commit d99be81 into microsoft:master Dec 10, 2020
@ehsannas ehsannas deleted the fix-3214 branch December 10, 2020 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spirv Work related to SPIR-V
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SPIR-V] Forward declaring a function inside another function causes a compiler crash
3 participants