aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/attrib.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-03-27 05:07:02 -0400
committerMarge Bot <[email protected]>2020-04-30 22:01:55 +0000
commit42842306d3c7ba71f89022a1ebb09a4454a1b6e0 (patch)
tree0ff9d8e04ebd26d7e699c13cb6481750af006486 /src/mesa/main/attrib.c
parent2e3a9d78289ace1928e2dc093fc743cad81c911c (diff)
mesa,st/mesa: add a fast path for non-static VAOs
Skip most of _mesa_update_vao_derived_arrays if the VAO is not static. Drivers need a separate codepath for this. This increases performance by 7% with glthread and the game "torcs". The reason is that glthread uploads vertices and sets vertex buffers every draw call, so the overhead is very noticable. glthread doesn't hide the overhead, because the driver thread is the busiest thread. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4314>
Diffstat (limited to 'src/mesa/main/attrib.c')
-rw-r--r--src/mesa/main/attrib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 74c449bfbcb..45018188168 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1589,6 +1589,8 @@ copy_array_object(struct gl_context *ctx,
dest->NonZeroDivisorMask = src->NonZeroDivisorMask;
dest->_AttributeMapMode = src->_AttributeMapMode;
dest->NewArrays = src->NewArrays;
+ dest->NumUpdates = src->NumUpdates;
+ dest->IsDynamic = src->IsDynamic;
}
/**