-
Notifications
You must be signed in to change notification settings - Fork 255
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
Segfault when accessing interface extension #5900
Comments
@kaizhangNV can you take a look at this in the current sprint? |
Yes |
You need to change
to
for now. I'm not sure whether |
From what I understand,
is not actually extending So when you try to use
|
I think what we should really fix is to report error at:
|
@kaizhangNV Actually this call is allowed in Slang. When defining a variable or a parameter whose type is an interface, it means an "existential type". The function will then be specialized by the actual type of the argument, if the type is statically known, or fallback to dynamic dispatch if the type isn't statically known. |
Hmm, good to know, then I think the actual issue is the specialization. As when I look at the IR code, it looks like the specialization can't specialize the actual type. In this code, the type is statically known. |
I did notice that changing it into the latter makes it work. This was surprising to me, since following the documentation I expected them to be treated the same. On this page: Unfortunately the second form does not work for us in this case due to reflection issues for generic functions (that's a separate problem), but it was my understanding the two would be equivalent. |
close the issue. |
The following snippet causes a compiler segfault:
Variations of it (e.g. commenting out
dummy
) generates invalid HLSL instead.The text was updated successfully, but these errors were encountered: