Skip to content

[SPIR-V] Validation Error: ID decorated with RelaxedPrecision multiple times is not allowed. #8609

Closed
KhronosGroup/SPIRV-Tools
#6828

Description

@NicVanZuylen

Description
Compiling HLSL which implements relaxed-precision types to SPIR-V may fail with a SPIR-V validation error similar to the following:
ID '[SPIR-V Result ID]' decorated with RelaxedPrecision multiple times is not allowed.

This issue may be caused by optimizations around relaxed-precision arithmetic operations, possibly in tandem with loop unrolling optimizations.

When disabling optimizations and/or relaxed-precision types [Remove] -DFB_SHADERCOMPILER_16BITRELAXEDPRECISION=1, -Od, the issue will not be present.

Steps to Reproduce

  1. Checkout and build DXC at SHA: 99400dc ('main' branch)
  2. Run the built dxc.exe on the following provided HLSL source file in:
    problemhlsl.zip
    with arguments:
    -T cs_6_0 -E csMipBatchBlur problemhlsl.hlsl -Fo problemshader.spv -HV 2018 -spirv -O3 -DFB_SHADERCOMPILER_16BITRELAXEDPRECISION=1
  3. Observe output for the aforementioned error.
  4. Try with optimizations and/or relaxed-precision disabled [Remove] -DFB_SHADERCOMPILER_16BITRELAXEDPRECISION=1, -Od and observe that the shader will compile to SPIR-V successfully.

Actual Behavior
Running dxc.exe with the above reproduction steps will produce the following error:

fatal error: generated SPIR-V is invalid: ID '9' decorated with RelaxedPrecision multiple times is not allowed.
  %9 = OpFAdd %float %41 %42

note: please file a bug report on https://github.com/Microsoft/DirectXShaderCompiler/issues with source code if possible

Environment

  • DXC version: dxcompiler.dll: 1.10(5371-99400dc8)(1.10.2605.0) - 1.10.2605.0
  • Host Operating System: Windows 11 24H2 Build 26100.7462
  • Commit SHA: 99400dc80ffa0eb6aef56fc6e482f5eff40185e4

Activity

  1. added
    bug
    spirv
    needs-triage
    on Jul 8, 2026
  2. added a commit that references this issue on Aug 5, 2026
    f0855c0
  3. joaosaffran commented on Nov 19, 2026

    @joaosaffran
    Collaborator

    This issue was fixed by KhronosGroup/SPIRV-Tools#6828 and integrated into DXC when #8739 was merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds-triagespirv

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions