<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - 19.1.0: assert in vkAllocateDescriptorSets using immutable samplers on Ivy Bridge"
href="https://bugs.freedesktop.org/show_bug.cgi?id=110999">110999</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>19.1.0: assert in vkAllocateDescriptorSets using immutable samplers on Ivy Bridge
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>git
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Drivers/Vulkan/intel
</td>
</tr>
<tr>
<th>Assignee</th>
<td>intel-3d-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>si@sjbrown.co.uk
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>intel-3d-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>CC</th>
<td>jason@jlekstrand.net
</td>
</tr></table>
<p>
<div>
<pre>Hi,
I've got what looks like a regression moving from 19.0.6 -> 19.1.0 running the
intel vulkan driver on IvyBridge. It seems that calling
vkAllocateDescriptorSets with a COMBINED_IMAGE_SAMPLER that uses an immutable
sampler causes a segfault.
I can reproduce this as an assert using a debug build from git today
(8ea7ee153649ac07c8418cc0d4aa5a4e123d19d1), here is the top of the callstack:
#0 0x00007ffff7bd9755 in raise () from /usr/lib/libc.so.6
#1 0x00007ffff7bc4851 in abort () from /usr/lib/libc.so.6
#2 0x00007ffff7bc4727 in __assert_fail_base.cold () from /usr/lib/libc.so.6
#3 0x00007ffff7bd2026 in __assert_fail () from /usr/lib/libc.so.6
#4 0x00007ffff72f233a in anv_descriptor_set_write_image_view
(device=0x5555561e9880, set=0x55555621a668,
info=0x7fffffff8740, type=VK_DESCRIPTOR_TYPE_SAMPLER, binding=0, element=0)
at ../src/intel/vulkan/anv_descriptor_set.c:1203
#5 0x00007ffff72f16f9 in anv_descriptor_set_create (device=0x5555561e9880,
pool=0x55555621a5d0,
layout=0x5555561220a0, out_set=0x7fffffff87c8) at
../src/intel/vulkan/anv_descriptor_set.c:971
#6 0x00007ffff72f19c8 in anv_AllocateDescriptorSets (_device=0x5555561e9880,
pAllocateInfo=0x7fffffff9a58,
pDescriptorSets=0x7fffffff8900) at
../src/intel/vulkan/anv_descriptor_set.c:1030
It seems that anv_descriptor_set_create() calls
anv_descriptor_set_write_image_view() to set up some stuff from the immutable
sampler, but due to recent changes anv_descriptor_set_write_image_view()
assumes that a layout that has the ANV_DESCRIPTOR_TEXTURE_SWIZZLE bit set
always has a non-null image_view (which we do not since we are only creating
the descriptor set at this stage).
If I patch the ANV_DESCRIPTOR_TEXTURE_SWIZZLE block at the end of
anv_descriptor_set_write_image_view() to only update the swizzle descriptors if
there is a non-null image_view, then my app goes back to running as expected.
I do not know if this is the correct fix for this issue though!</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>