Bug 106504

Summary: vulkan SPIR-V parsing failed at ../src/compiler/spirv/vtn_cfg.c:381
Product: Mesa Reporter: xbx <xavierb>
Component: Drivers/Vulkan/CommonAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: airlied, chadversary, daniel, jason
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: vkrunner file

Description xbx 2018-05-13 20:36:53 UTC
Created attachment 139548 [details]
vkrunner file

hello,

I get an error with both radv and intel

SPIR-V parsing FAILED:
    In file ../src/compiler/spirv/vtn_cfg.c:381
    block->node.link.next == NULL
    0 bytes into the SPIR-V binary


when using this hlsl shader (compiled with glslang):

float4 main(float4 fragCoord : SV_POSITION) : SV_Target0
{
        float4          Sum = 0;
        for (int i=0; i<2; i++) {
                for (int j=0; j<2; j++) {
			Sum += fragCoord;
                }
        }
        return Sum / 4;
}

(the spirv source file is attached.)


This report is a follow-up to 
https://github.com/KhronosGroup/SPIRV-Tools/issues/1456 
"The outer loop's continue block ends up as the same block as the inner loop's continue block. I wonder if the Mesa compiler doesn't expect this (assuming there are no other bugs)."

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.