Bug 94182

Summary: Vulkan: LunarG's Hologram demo hits an assert
Product: Mesa Reporter: Grazvydas Ignotas <notasas>
Component: Drivers/Vulkan/intelAssignee: Intel 3D Bugs Mailing List <intel-3d-bugs>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium CC: jackoalan
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Grazvydas Ignotas 2016-02-16 21:27:40 UTC
LunarG's Vulkan SDK Hologram demo (from vulkansdk-linux-x86_64-1.0.3.1.run downloadable from vulkan.lunarg.com , VulkanSDK/1.0.3.1/samples/Demos/Hologram) fails to start.

VK_ICD_FILENAMES=/home/notaz/src/mesa/src/vulkan/anv_icd.json ./Hologram 
anv_device.c:340: FINISHME: Get correct values for PhysicalDeviceFeatures
anv_device.c:405: FINISHME: Get correct values for VkPhysicalDeviceLimits
ASSERT: Scalar FS validation failed!
mov(8) vgrf4+3.0:F, vgrf5+3.0:F 
brw_fs_validate.cpp:47: inst->dst.reg_offset + inst->regs_written <= alloc.sizes[inst->dst.nr]
Aborted

Mesa 11.2.0-devel (git-0a3324e) (vulkan branch)
Intel(R) HD Graphics 530 (Skylake GT2)
kernel: 4.4.1
Comment 1 jackoalan 2016-02-24 02:54:44 UTC
I can confirm the same assert failure on Haswell.

I've also found a workaround that could point to the root cause.

================ CRASH ====================
#version 310 es

precision highp float;

in vec3 color;

layout(location = 0) out vec4 fragcolor;

void main()
{
	fragcolor = vec4(color, 0.5);
}
===========================================

============== NO CRASH ===================
#version 310 es

precision highp float;

in vec4 color;

layout(location = 0) out vec4 fragcolor;

void main()
{
	fragcolor = vec4(color.xyz, 0.5);
}
===========================================

Something about a non-vec4 input upsets the compiler. The same crash happens for vec2.
Comment 2 Christoph Haag 2016-05-06 11:35:26 UTC
You may want to retest it. I had the same issue and if I remember correctly it was caused and fixed by this:
https://github.com/LunarG/VulkanSamples/pull/73

I tried the 1.0.11 vulkan sdk download and it includes this fix so Hologram works for me, albeit very slow (Ivy Bridge, known issue).

Apparently there is no binary distribution anymore, so:

./build_samples.sh
cd samples/build/Sample-Programs/Hologram
./Hologram
Comment 3 Grazvydas Ignotas 2016-05-15 19:50:53 UTC
Right, 1.0.11 woks here on SKL too.

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.