1. 26 Oct, 2018 1 commit
    • Rob Clark's avatar
      freedreno: import libdrm_freedreno + redesign submit · f3cc0d27
      Rob Clark authored
      
      
      In the pursuit of lowering driver overhead, it became clear that some
      amount of redesign of how libdrm_freedreno constructs the submit ioctl
      would be needed.  In particular, as the gallium driver is starting to
      make heavier use of CP_SET_DRAW_STATE state groups/objects, the over-
      head of tracking cmd buffers and relocs becomes too much.  And for
      "streaming" state, which isn't ever reused (like uniform uploads) the
      overhead of allocating/freeing ringbuffer[1] objects is too high.
      
      This redesign makes two main changes:
      
       1) Introduces a fd_submit object for tracking bos and cmds table
          for the submit ioctl, making ringbuffer objects more light-
          weight.  This was previously done in the ringbuffer.  But we
          have many ringbuffer instances involved in a submit (gmem +
          draw + potentially 1000's of state-group rbs), and only need
          a single bos and cmds table.  (Reloc table is still per-rb)
      
          The submit is also a convenient place for a slab allocator for
          ringbuffer objects.  Other options would have required locking
          because, while we can guarantee allocations will only happen on
          a single thread, free's could happen either on the application
          thread or the flush_queue thread.  With the slab allocator in
          the submit object, any frees that happen on the flush_queue
          thread happen after we know that the application thread is done
          with the submit.
      
       2) Introduce a new "softpin" msm_ringbuffer_sp implementation that
          does not use relocs and only has cmds table entries for IB1 (ie.
          the cmdstream buffers that kernel needs to CP_INDIRECT_BUFFER
          to from the RB).  To do this properly will require some updates
          on the kernel side, so whether you get the softpin or legacy
          submit/ringbuffer implementation at runtime depends on your
          kernel version.
      
      To make all these changes in libdrm would basically require adding a
      libdrm_freedreno2, so this is a good point to just pull the libdrm code
      into mesa.  Plus it allows for using mesa's hashtable, slab allocator,
      etc.  And it lets us have asserts enabled for debug mesa buids but
      omitted for release builds.  And it makes life easier if further API
      changes become necessary.
      
      At this point I haven't tried to pull in the kgsl backend.  Although
      I left the level of vfunc indirection which would make it possible
      to have other backends.  (And this was convenient to keep to allow
      for the "softpin" ringbuffer to coexist.)
      
      NOTE: if bisecting a build error takes you here, try a clean build.
      There are a bunch of ways things can go wrong if you still have
      libdrm_freedreno cflags.
      
      [1] "ringbuffer" is probably a bad name, the only level of cmdstream
          buffer that is actually a ring is RB managed by kernel.  User-
          space cmdstream is all IB1/IB2 and state-groups.
      Reviewed-by: default avatarKristian H. Kristensen <hoegsberg@chromium.org>
      Reviewed-by: default avatarEric Engestrom <eric.engestrom@intel.com>
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      f3cc0d27
  2. 17 Oct, 2018 8 commits
  3. 08 Oct, 2018 2 commits
  4. 02 Oct, 2018 1 commit
  5. 27 Sep, 2018 8 commits
  6. 17 Aug, 2018 1 commit
  7. 16 Aug, 2018 1 commit
  8. 30 Jul, 2018 1 commit
  9. 18 Jul, 2018 1 commit
  10. 21 Jun, 2018 1 commit
  11. 14 Nov, 2017 1 commit
  12. 24 Oct, 2017 1 commit
  13. 07 Jun, 2017 1 commit
  14. 16 May, 2017 1 commit
  15. 13 May, 2017 1 commit
  16. 10 May, 2017 1 commit
    • Marek Olšák's avatar
      gallium: remove pipe_index_buffer and set_index_buffer · 330d0607
      Marek Olšák authored
      pipe_draw_info::indexed is replaced with index_size. index_size == 0 means
      non-indexed.
      
      Instead of pipe_index_buffer::offset, pipe_draw_info::start is used.
      For indexed indirect draws, pipe_draw_info::start is added to the indirect
      start. This is the only case when "start" affects indirect draws.
      
      pipe_draw_info::index is a union. Use either index::resource or
      index::user depending on the value of pipe_draw_info::has_user_indices.
      
      v2: fixes for nine, svga
      330d0607
  17. 18 Apr, 2017 3 commits
  18. 22 Jan, 2017 2 commits
  19. 27 Dec, 2016 1 commit
    • Rob Clark's avatar
      freedreno/a5xx: transform-feedback support · d10c5a24
      Rob Clark authored
      
      
      We'll need to revisit when adding hw binning pass support, whether we
      can still do this in main draw step, as we do w/ a3xx/a4xx, or if we
      needed to move it to the binning stage.
      
      Still some failing piglits but most tests pass and the common cases seem
      to work.
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      d10c5a24
  20. 30 Nov, 2016 1 commit
  21. 07 Oct, 2016 1 commit
  22. 16 Aug, 2016 1 commit