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

SPIR-V library support for import decorations on function declarations #4992

Open
cheneym2 opened this issue Sep 3, 2024 · 0 comments · May be fixed by #5048
Open

SPIR-V library support for import decorations on function declarations #4992

cheneym2 opened this issue Sep 3, 2024 · 0 comments · May be fixed by #5048
Assignees
Labels
goal:forward looking Feature needed at a later date, not connected to a specific use case.

Comments

@cheneym2
Copy link
Collaborator

cheneym2 commented Sep 3, 2024

To have linkable spir-v libraries, it will be necessary to allow "import"s. Any IR lowered to SPIR-V which contains function declarations without definitions should be tagged with import linkage attributes.

@cheneym2 cheneym2 self-assigned this Sep 3, 2024
@cheneym2 cheneym2 added this to the Q3 2024 (Summer) milestone Sep 3, 2024
@cheneym2 cheneym2 added the goal:forward looking Feature needed at a later date, not connected to a specific use case. label Sep 3, 2024
cheneym2 added a commit to cheneym2/slang that referenced this issue Sep 10, 2024
Adds appropriate linkage and function declaration syntax
for SPIR-V functions that are declared, to be imported
from another SPIR-V module.

Unlike DXIL, stripping the Slang IR for a function down
to a declaration requires retaining a block of parameters,
as the function declaration must be emitted to SPIR-V
with the same parameters as a definition. Because that
thwarts the logic in Slang to tell the difference between
a declaration and definition, and explicit decoration is
introduced to explicitly mark functions which need to be
treated as declarations during emit phase.

Fixes shader-slang#4992
@cheneym2 cheneym2 linked a pull request Sep 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
goal:forward looking Feature needed at a later date, not connected to a specific use case.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants