Conversation
d64dd36 to
ea25c7e
Compare
|
I wonder if we should land this behind an off-by-default flag? Or maybe that is more trouble than it is worth. |
|
I'm shocked I haven't thought of this earlier... then I wouldn't have to keep updating this PR constantly |
|
@LegNeato Buffers are easy, but for images, we can't just asm! {
// error[E0658]: attributes on expressions are experimental
// error: removing an expression is not supported in this position
#[cfg(feature = "non-uniform")]
"OpDecorate %image NonUniform"
...
}We can't put it in a separate Would you mind if I just add a linking stage instead to remove all |
|
I'm personally fine with either a linking stage or copying 200 lines (or a macro so no need to copy?) |
|
I've taken the linking stage filter route and added the I've added some tests in branch |
…e decoration during linking if undesired
…nUniform` capability is enabled
|
@LegNeato this is ready to review, in case it has gone under. Just needed a rebase due to compiletest conflicts. |
Adds the NonUniform declaration to pretty much everything I could think of, even if it's not required. I don't think this will have a huge performance impact, as Nvidia and Intel don't seem to care about this flag, their accesses are always non-uniform, and Amd's driver is really good at figuring out whether something is uniform / scalar across the workgroup / subgroup or not.
To have NonUniform declared everywhere, you just need to enable it's associated capability:
SpirvBuilder::capability(Capability::ShaderNonUniform)closes #120