When constants are defined after precision statements that are not highp the compiler will emit multiple precision decorations causing optimization to fail with an internal error.
shaderc: internal error: compilation succeeded but failed to optimize: ID '22' decorated with RelaxedPrecision multiple times is not allowed.
%float_0 = OpConstant %float 0
Vulkan SDK 1.3.290,0 shaderc v2023.8 v2024.1-9-g3ac03b8 spirv-tools v2024.3 v2022.4-513-g0cfe9e72 glslang 11.1.0-1009-gfa9c3deb Windows 11 / Intel x86_64
Issue first occurred using Vulkan SDK 1.3.283.0
When constants are defined after precision statements that are not highp the compiler will emit multiple precision decorations causing optimization to fail with an internal error.
This script repros the issue.