summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_save_api.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2009-08-31 10:13:22 -0700
committerEric Anholt <[email protected]>2009-09-01 20:35:19 -0700
commit60b08eb1fdf287d28ec66b9282513ab35a61aee0 (patch)
tree0230f446c99b4957f146289c7295e019e0670ed7 /src/mesa/vbo/vbo_save_api.c
parenta82cd55a5cb1ad617960551560b107edffad1e9a (diff)
mesa: Make MultiDrawElements submit multiple primitives at once.
Previously, MultiDrawElements just called DrawElements a bunch of times. By sending several primitives down the pipeline at once, we avoid a bunch of validation. On my GL demo, this improves fps by 2.5% (+/- .41%) and reduces CPU usage by 70.5% (+/- 2.9%) (n=3). Reviewed by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_save_api.c')
-rw-r--r--src/mesa/vbo/vbo_save_api.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index cdbbc9c1876..1771510d848 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -73,6 +73,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/dlist.h"
#include "main/enums.h"
#include "main/macros.h"
+#include "main/api_noop.h"
#include "main/api_validate.h"
#include "main/api_arrayelt.h"
#include "main/vtxfmt.h"
@@ -1038,6 +1039,8 @@ static void _save_vtxfmt_init( GLcontext *ctx )
vfmt->DrawArrays = _save_DrawArrays;
vfmt->DrawElements = _save_DrawElements;
vfmt->DrawRangeElements = _save_DrawRangeElements;
+ /* Loops back into vfmt->DrawElements */
+ vfmt->MultiDrawElementsEXT = _mesa_noop_MultiDrawElements;
}
@@ -1228,6 +1231,8 @@ void vbo_save_api_init( struct vbo_save_context *save )
ctx->ListState.ListVtxfmt.DrawArrays = _save_OBE_DrawArrays;
ctx->ListState.ListVtxfmt.DrawElements = _save_OBE_DrawElements;
ctx->ListState.ListVtxfmt.DrawRangeElements = _save_OBE_DrawRangeElements;
+ /* loops back into _save_OBE_DrawElements */
+ ctx->ListState.ListVtxfmt.MultiDrawElementsEXT = _mesa_noop_MultiDrawElements;
_mesa_install_save_vtxfmt( ctx, &ctx->ListState.ListVtxfmt );
}