Files
metal2vulkan/tests
Anees Iqbal fed00f1e18 Stop a fragment demanding features for a parameter it does not have
A `[[function_constant(x)]]` entry parameter exists only when the pipeline
supplies `x` as true, and nothing supplies function-constant values here -- so a
gated parameter is absent and its uses are statically dead. The vertex and
kernel decodes already treat one that way: their role reader collapses a gated
argument back to the wrapper unless it is a promoted resource. The fragment
reader looked past the wrapper unconditionally, and wired the builtin anyway.

For a resource that distinction does not matter, and must not: the descriptor
stays in the pipeline layout the application binds against either way. For a
system value it does. A builtin declared for an absent parameter puts a variable
in the entry point interface, and `[[viewport_array_index]]` and
`[[render_target_array_index]]` put `ShaderViewportIndex` / `ShaderLayer` in the
module -- device features the shader never reads, narrowing which devices can
create the pipeline.

Over 2880 corpus sources, 25 modules change and none changes status: 47
capabilities, 51 Input variables with their loads and conversions, and 98
decorations go away, and nothing is added but the undef values those absent
parameters already bind elsewhere. spirv-val clean throughout.
2026-09-01 03:15:57 +03:00
..
2026-07-22 13:15:24 +03:00