Skip to content

[SPIR-V] DebugTypeComposite Column End (8) exceeds line length (2) in shader.debug.sourcecontinued.hlsl #8345

@s-perron

Description

@s-perron

Description
Updating the SPIRV-Tools submodule has exposed a validation failure in tools/clang/test/CodeGenSPIRV/shader.debug.sourcecontinued.hlsl.

Error Message

fatal error: generated SPIR-V is invalid: NonSemantic.Shader.DebugInfo.100 DebugTypeComposite: operand Column End (8) is larger then Line 15 column length of 2 found in the DebugSource text                                                                                             
  %59 = OpExtInst %void %1 DebugTypeComposite %58 %uint_1 %23 %uint_15 %uint_8 %44 %58 %uint_128 %uint_3 %55                                                                                                                                                                              

Steps to Reproduce

Run the following command:

./bin/dxc -T ps_6_0 -E MainPs -fspv-debug=vulkan-with-source-test -fcgl tools/clang/test/CodeGenSPIRV/shader.debug.sourcecontinued.hlsl -spirv                                                                                                                                            

Actual Behavior

The validation error indicates that DebugTypeComposite is being generated with a column end of 8, but the validator believes the line in the DebugSource text is only 2 characters long.

Looking at the source code for the test:

struct PS_INPUT                                                                                                                                                                                                                                                                           
{                                                                                                                                                                                                                                                                                         
    float2 vTextureCoords : TEXCOORD2 ;                                                                                                                                                                                                                                                   
} ;                                                                                                                                                                                                                                                                                       

The line clearly has more than 2 characters. Because this specific test is designed to test DebugSourceContinued, it is highly likely that the continued source text is not being properly reassembled or calculated by the updated validator's line-length checks.

Note: The test has been marked as XFAIL: * in the interim to unblock the roll.

Environment

  • DXC version trunk (However older versions fail if spir-v is validated user a newer validator.)
  • Host Operating System all

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug, regression, crashspirvWork related to SPIR-V

    Type

    No type

    Projects

    Status

    Triaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions