lima: fix limitations on vertex number and varying buffer size
Merge request reports
Activity
added lima label
mentioned in merge request !768 (closed)
This aims to fix lima/mesa#116 (closed) and other glmark2 issues, and supersedes !768 (closed).
- Resolved by Erico Nunes
Do we use suballocator anywhere else? If not, we can just drop it.
- Resolved by Erico Nunes
mentioned in merge request !2463 (merged)
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
Toggle commit list-
3e5097a1...911a8261 - 794 commits from branch
Some thoughts after trying this a litle more.
It's not clear to me how most drivers handle this.
u_indices.c
andu_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)
- Resolved by Erico Nunes
- Resolved by Erico Nunes
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
- Resolved by Erico Nunes