Skip to content
Snippets Groups Projects

lima: fix limitations on vertex number and varying buffer size

Merged Erico Nunes requested to merge enunes/mesa:lima-vertex-fixes into master

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Erico Nunes mentioned in merge request !2463 (merged)

    mentioned in merge request !2463 (merged)

  • Erico Nunes added 797 commits

    added 797 commits

    • 3e5097a1...911a8261 - 794 commits from branch mesa:master
    • c6670c83 - lima: allocate separate bo to store varyings
    • bea3e47f - lima: refactor indexed draw indices upload
    • 9041fa55 - lima: split draw calls on 64k vertices

    Compare with previous version

  • Author Developer

    Some thoughts after trying this a litle more.

    It's not clear to me how most drivers handle this. u_indices.c and u_primconvert.c seem to be solving a different problem, as far as I could see, of enabling support for primitives that the hardware doesn't support.

    vc4 has an explicit implementation to split calls into multiple calls of also 64k vertices. I ported that to lima and it seems to work well. I tested it with a small max_vertex limit and that works even with geometry types like triangle strips.

    In the vc4 implementation indexed draws seem to be left out to a separate code path. So I left that out for now too. This is getting complex already so I guess we could leave it to a separate MR if required.

    I also found u_split_prim.h which looks more like the problem we have, though it dates from 2010 and no longer has any users in mesa. It might be something that can be revived to avoid duplication of that implementation in vc4 and lima. Though I'd rather have a port of the vc4 implementation to lima first to finally unblock glmark2 runs without crashing, as I suppose a lot of users try this. And then do a refactor to use something shared like that later.

    @anholt since it seems that you did the one on vc4: any thoughts?

  • I don't think u_split_prim would work for vc4, as it wants to be able to incrementally emit verts and have those all be part of the same draw, which vc4 can't do. (See the close_first path, for example). I would love to see vc4's impl pulled out to shared code instead of duplicated, if you're going to reuse it (so that hopefully we can some up with some plan to handle line loops some day, in one place)

  • Erico Nunes added 4 commits

    added 4 commits

    • d2677825 - lima: allocate separate bo to store varyings
    • e846ead4 - lima: refactor indexed draw indices upload
    • 411c1cc8 - vc4: move the draw splitting routine to shared code
    • fb170a5f - lima: split draw calls on 64k vertices

    Compare with previous version

  • Author Developer

    I pushed a version with some initial place to share that piece of code. Not too much of a big refactor. This is not extensively tested, especially not with vc4.

  • LGTM. Lima part: Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>

  • added gallium vc4 labels

  • Emma Anholt
    • Resolved by Erico Nunes

      @enunes,

      It would be nice if you could include new files into Android build system:

      diff --git a/src/gallium/auxiliary/Makefile.sources b/src/gallium/auxiliary/Makefile.sources
      index 8961ae2a1e0..9f835a57210 100644
      --- a/src/gallium/auxiliary/Makefile.sources
      +++ b/src/gallium/auxiliary/Makefile.sources
      @@ -307,6 +307,8 @@ C_SOURCES := \
              util/u_screen.h \
              util/u_simple_shaders.c \
              util/u_simple_shaders.h \
      +       util/u_split_draw.c \
      +       util/u_split_draw.h \
              util/u_split_prim.h \
              util/u_sse.h \
              util/u_suballoc.c \
      Edited by Roman Stratiienko
  • Andreas Baierl
  • Erico Nunes added 3 commits

    added 3 commits

    • 56d80f00 - lima: refactor indexed draw indices upload
    • 6f90e8ff - vc4: move the draw splitting routine to shared code
    • ca653dbb - lima: split draw calls on 64k vertices

    Compare with previous version

  • Erico Nunes resolved all threads

    resolved all threads

  • Erico Nunes unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading