Add tests for every builtin #789
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In discord, it was pointed out that
#[spirv(workgroup_size)]
is broken - the decoration applies to a constant, not a variable, and it specifies the workgroup size, it's not provided with the workgroup size. (A subsequent discussion also showed that WorkgroupSize in SPIR-V is just plain broken with multi-entry-point shaders - but the LocalSize(Id) execution mode is a replacement for its behavior)So, I decided to add a test for every builtin, to make sure nothing else is broken! turns out
bool
builtins are broken, I'll file a follow-up issue, and we had a fair amount of Kernel-only builtins which shouldn't be included.Also, fixed a typo with
layer_per_view_nv
, and fixedopengl4.5
targeting SPIR-V 1.3 - spirv-val complains when trying to build with env opengl4.5, it's required to be 1.0.Unfortunately, the test can't actually be added to CI, because compiletests is broken. Either @eddyb or I will hopefully be filing a fix soon. (both
// ignore-vulkan1.1
and// only-vulkan1.1
are broken)