<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 - CmdBindDescriptorSets gets confused about dynamic offsets"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=109565">109565</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>CmdBindDescriptorSets gets confused about dynamic offsets
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>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/radeon
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jakub@okonski.org
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I've had crashes that I was unable diagnose on the same application (a custom
one that I wrote) on mesa 18, but I never debug symbols or anything helpful.

I installed 19.0.0-rc2 and tried it again out of curiosity. It still crashes,
but I get an assertion error at least:

v4: ../mesa-19.0.0-rc2/src/amd/vulkan/radv_cmd_buffer.c:2765:
radv_CmdBindDescriptorSets: Assertion `dyn_idx < dynamicOffsetCount' failed.

Thread 8 "v4" received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff6e58700 (LWP 9437)]
0x00007ffff7c23d7f in raise () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff7c23d7f in raise () from /usr/lib/libc.so.6
#1  0x00007ffff7c0e672 in abort () from /usr/lib/libc.so.6
#2  0x00007ffff7c0e548 in __assert_fail_base.cold.0 () from /usr/lib/libc.so.6
#3  0x00007ffff7c1c396 in __assert_fail () from /usr/lib/libc.so.6
#4  0x00007ffff49af3bf in ?? () from /usr/lib/libvulkan_radeon.so
#5  0x00007ffff4173548 in ?? () from /usr/lib/libVkLayer_unique_objects.so
#6  0x00007ffff40d936d in ?? () from /usr/lib/libVkLayer_unique_objects.so
#7  0x00007fffd54770e9 in ?? () from /usr/lib/libVkLayer_core_validation.so
#8  0x00007fffd50c6374 in ?? () from /usr/lib/libVkLayer_object_lifetimes.so
#9  0x00007fffd50351b0 in ?? () from /usr/lib/libVkLayer_object_lifetimes.so
#10 0x00007fffd4c34001 in ?? () from
/usr/lib/libVkLayer_parameter_validation.so
#11 0x00007fffd494f684 in ?? () from /usr/lib/libVkLayer_thread_safety.so
#12 0x00007fffd48e5a43 in ?? () from /usr/lib/libVkLayer_thread_safety.so
#13 0x000055555588990c in ash::vk::DeviceFnV1_0::cmd_bind_descriptor_sets ()

This assertion only triggers with standard validation layers turned on. When I
re-run my app without them enabled, the backtrace is similar but no assertion
is triggered. This may indicate some weird interaction with validation layers
perhaps?

Thread 2 "v4" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7a5e700 (LWP 12868)]
0x00007ffff4bb01cd in ?? () from /usr/lib/libvulkan_radeon.so
(gdb) bt
#0  0x00007ffff4bb01cd in ?? () from /usr/lib/libvulkan_radeon.so
#1  0x000055555588711c in ash::vk::DeviceFnV1_0::cmd_bind_descriptor_sets ()

Because this is a segfault and not an explicit assertion that failed, it may be
that these are separate problems.

Either way, I am not using any dynamic offsets and this code works on the
proprietary AMD driver on Windows. Strangely, it does not work on amdvlk and in
fact it puts my GPU in an infinite loop where I have to reboot the whole
machine. It also works a Skylake iGPU using anv, but it hangs during shader
execution for a different reason.

Please advise on what data to extract for debugging purposes.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>