diff options
author | Marek Olšák <[email protected]> | 2020-03-22 21:00:18 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2020-04-06 10:30:10 -0400 |
commit | 068a3bf0d7cda0301b3dfc2e258698c6848ca706 (patch) | |
tree | e13384a38786d6f5d6603c87b0961261ad464c7a /src/gallium/auxiliary/util | |
parent | d9cb0ec5e611b5ba469a20e27fcd4001e88e841c (diff) |
util: move and adjust the vertex upload heuristic equation from u_vbuf
This will also be used by glthread.
The new equation is optimized for glthread.
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_vbuf.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c index f47d93ac3f1..567cb6a75c9 100644 --- a/src/gallium/auxiliary/util/u_vbuf.c +++ b/src/gallium/auxiliary/util/u_vbuf.c @@ -1433,8 +1433,7 @@ void u_vbuf_draw_vbo(struct u_vbuf *mgr, const struct pipe_draw_info *info) * performance. */ if (!info->indirect && !new_info.primitive_restart && - num_vertices > new_info.count * 4 && - new_info.count > 32 && + util_is_vbo_upload_ratio_too_large(new_info.count, num_vertices) && !u_vbuf_mapping_vertex_buffer_blocks(mgr)) { unroll_indices = TRUE; user_vb_mask &= ~(mgr->nonzero_stride_vb_mask & |