-
Notifications
You must be signed in to change notification settings - Fork 263
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
gfx-unit-test/link-time-constant.slang fails with precompiled SPIR-V modules #6524
Comments
Looks like the link time constants like
Are causing compilation failures because they're unresolved by the module that's being compiled.
|
Here's a directed test to show the issue: Test name: tests/library/precompiled-spirv-global.slang
|
Precompiling the module to SPIRV fails when the globals referenced are included only via "extern" declarations and the definitions are not included via directly importing the definition. If "myGlobalVar" is actually defined by importing a module that defines it, there's no problem, as the definition is included. I think we can support this usecase though by leaving the mGlobalVar declaration in the precompiled SPIRV with import Linkage. But it will only work if the module actually defining myGlobalVar also receives complementary export Linkage. |
This test exercises link time constants used by modules that are precompiled to SPIR-V. Work on shader-slang#6524
This test exercises link time constants used by modules that are precompiled to SPIR-V. Work on shader-slang#6524
This test exercises link time constants used by modules that are precompiled to SPIR-V. Work on shader-slang#6524
This test exercises link time constants used by modules that are precompiled to SPIR-V. Work on shader-slang#6524
I've posted a directed test for this here: #6532 To run:
The test crashes as-is, and so it's on the "expected failure list". Any fix for this bug should remove "tests/library/precompiled-spirv-global" from |
This test exercises link time constants used by modules that are precompiled to SPIR-V. Work on shader-slang#6524
This test exercises link time constants used by modules that are precompiled to SPIR-V. Work on shader-slang#6524
When modules contain extern references to globals they don't define, or when the contain exports of globals they may or may not use, utilize SPIR-V linkage attributes to define and use the variables in embedded SPIR-V IR. Fixes shader-slang#6524
When modules contain extern references to globals they don't define, or when the contain exports of globals they may or may not use, utilize SPIR-V linkage attributes to define and use the variables in embedded SPIR-V IR. Fixes shader-slang#6524
When modules contain extern references to globals they don't define, or when the contain exports of globals they may or may not use, utilize SPIR-V linkage attributes to define and use the variables in embedded SPIR-V IR. Fixes shader-slang#6524
When modules contain extern references to globals they don't define, or when the contain exports of globals they may or may not use, utilize SPIR-V linkage attributes to define and use the variables in embedded SPIR-V IR. Fixes shader-slang#6524
When modules contain extern references to globals they don't define, or when the contain exports of globals they may or may not use, utilize SPIR-V linkage attributes to define and use the variables in embedded SPIR-V IR. Fixes shader-slang#6524
Originally seen in gfx-unit-test-tool/linkTimeConstantD3D12.internal with precompiled target.
Repro:
slang-test gfx-unit-test-tool/linkTimeConstantD3D12
Module 1:
Module 2:
The text was updated successfully, but these errors were encountered: