Closed SiebenCorgie closed 1 day ago
You can make this work with the latest top of tree: https://godbolt.org/z/9fzdeoGYT. You can add the attribute to the entry point, and use the universal1.5 target env (-fspv-target-env=universal1.5).
However, the [[vk::ext_capability(/* Linkage */ 5)]]
attribute is meant to be used when you are using other inline spir-v that requires the extension. The linkage capability would be added automatically by the compiler, but at this time it only adds the capability if there are no entry points in the module. This condition should be updated. This is a bug in the compiler that needs to be fixed.
Description
I'm currently trying to mark a function
Export
using SPIR-V's Linkage capability.I get to this compilation error:
But I can't find a way to add
[[vk::ext_capability(/* Linkage */ 5)]]
to the right location.Adding it to the function in question does nothing, decorating the entry point does nothing as well. Just adding it to the top of my file gives the error
error: an attribute list cannot appear here
which makes sense, given the rules described hereAm I missing something, or is this just not possible at the moment?
Steps to Reproduce
see this example code. It includes adding the capability to both, the function in question, as well as the entry point.
Actual Behavior
The compiler fails with:
So the function is already decorated
Export
, but theLinkage
capability is missing.Environment