[Bug 105695] [PERF] Updating ubo offset via vkCmdBindDescriptorSets is causing flush that is taking 50% of rendering time

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Mar 22 15:51:30 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=105695

            Bug ID: 105695
           Summary: [PERF] Updating ubo offset via vkCmdBindDescriptorSets
                    is causing flush that is taking 50% of rendering time
           Product: Mesa
           Version: git
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Vulkan/intel
          Assignee: intel-3d-bugs at lists.freedesktop.org
          Reporter: ytriffy at gmail.com
        QA Contact: intel-3d-bugs at lists.freedesktop.org
                CC: jason at jlekstrand.net

I do vkCmdBindDescriptorSets per draw call to change transformation matrix of
an object. Basically I change only one number - offset into dynamic ubo. Then I
call vkCmdDrawIndexed and it calls gen9_cmd_buffer_flush_state that amounts to
50% of rendering time (in terms of instr fetch metric). I dig deeper and find
two culprits: flush_descriptor_sets, cmd_buffer_flush_push_constants. And I
don't even use push constants, I prefer dynamic ubos. Emitting binding tables
is huge amount of work (23% of total rendering time). I don't understand why so
much work has to be done just to change offset in memory. And this is the most
popular usecase - everyone wants to change matrix per object. My opengl
implementation is 2 times faster than this. Are there any plans on improving
performance in that area?

I got this data from valgrind profiling:
https://www.dropbox.com/s/wsri01x69kwciyo/callgrind.cullingvk_ubo.out?dl=0

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20180322/d85b1118/attachment.html>


More information about the intel-3d-bugs mailing list