Bug 106504 - vulkan SPIR-V parsing failed at ../src/compiler/spirv/vtn_cfg.c:381
Summary: vulkan SPIR-V parsing failed at ../src/compiler/spirv/vtn_cfg.c:381
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/Common (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-13 20:36 UTC by xbx
Modified: 2018-05-15 20:28 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
vkrunner file (2.37 KB, text/plain)
2018-05-13 20:36 UTC, xbx
Details

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.