vtn: Support the UniformDecoration capability.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

This is needed for SPIR-V 1.6 support in OpenCL. This capability enables
the Uniform and UniformId decorations which prior were Shader only.

The CTS ends up using those decorations on function arguments, but we can
just ignore handling them there for now.

Fixes the spirv16_uniformdecoration_uniform and
spirv16_uniformdecoration_uniformid CL CTS test inside test_spirv_new.

Fixes: bb6d371c0e ("rusticl: support SPIR-V 1.5 and 1.6")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34004>
This commit is contained in:
Karol Herbst 2025-03-10 23:46:32 +01:00 committed by Marge Bot
parent 3a9954c117
commit 6181f52089
3 changed files with 4 additions and 0 deletions

View file

@ -189,6 +189,7 @@ static const struct spirv_capabilities implemented_capabilities = {
.UniformAndStorageBuffer8BitAccess = true,
.UniformBufferArrayDynamicIndexing = true,
.UniformBufferArrayNonUniformIndexingEXT = true,
.UniformDecoration = true,
.UniformTexelBufferArrayDynamicIndexingEXT = true,
.UniformTexelBufferArrayNonUniformIndexingEXT = true,
.VariablePointers = true,

View file

@ -131,6 +131,8 @@ function_parameter_decoration_cb(struct vtn_builder *b, struct vtn_value *val,
case SpvDecorationRelaxedPrecision:
case SpvDecorationRestrict:
case SpvDecorationRestrictPointer:
case SpvDecorationUniform:
case SpvDecorationUniformId:
case SpvDecorationVolatile:
break;

View file

@ -296,6 +296,7 @@ impl SPIRVBin {
LiteralSampler: true,
SampledBuffer: true,
Sampled1D: true,
UniformDecoration: true,
Vector16: true,
..Default::default()
}