Every compute VkPipeline rt makes is now created from a shader module of its own, made of the
kernel's words with each specialization constant the plain constant of its value and destroyed
once the create returns; the create names no VkSpecializationInfo. Vulkan defines specialization
as exactly this conversion (VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849), so
what a kernel computes is unchanged; what changes is that no driver is handed a specialization
constant to size a workgroup or an array from.
- Translator: pipeline::specialize(words, values) (spirv::specialize). OpSpecConstant,
OpSpecConstantTrue/False become OpConstant/OpConstantTrue/False of the given value or the
default; each OpSpecConstantOp becomes the constant it computes (SpecOp::eval, now product code,
and SpecOp::opcode, which the serializer shares); OpSpecConstantComposite becomes
OpConstantComposite; the SpecId decorations go; a WorkgroupSize composite loses its BuiltIn
decoration and the entry point takes its values as OpExecutionMode LocalSize. The translator's
output is unchanged (no SEMANTICS_VERSION bump).
- rt: Kernel holds its words (Code::Module(Arc<[u32]>)) instead of a VkShaderModule made at
Kernel::new; Kernel::make specializes per variant and makes, uses and destroys the module.
Heavy kernels specialize the same way: the stage request carries the specialized words and no
ids or data (WIRE_VERSION 3), and the helper compiles them as they are (HELPER_VERSION 2).
Lowered::Failed and Unmade go: nothing creates a shader module at Kernel::new now.
- Tests: serializer tests specialize (a deep kernel's spec constants, its bool, two Workgroup
arrays sized by OpSpecConstantOps: values given and defaults, spirv-val under Vulkan 1.2 and
1.3); rt deep_threadgroups a_kernel_reaches_the_driver_with_its_workgroup_size_as_literals.
- Docs: API.md (section 3), rt README.