From 60b08eb1fdf287d28ec66b9282513ab35a61aee0 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 31 Aug 2009 10:13:22 -0700 Subject: 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 --- src/mesa/main/dd.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/dd.h') diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 1d92e510a4..f02e868d4a 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -1150,7 +1150,11 @@ typedef struct { void (GLAPIENTRYP DrawRangeElements)( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices ); - /*@}*/ + void (GLAPIENTRYP MultiDrawElementsEXT)( GLenum mode, const GLsizei *count, + GLenum type, + const GLvoid **indices, + GLsizei primcount); + /*@}*/ /** * \name Eval -- cgit v1.2.3 From 2f6d2a9e27f8582591dc60655f7d7b14d7552bbc Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 3 Sep 2009 09:41:41 -0600 Subject: mesa: change ctx->Driver.BufferData() to return GLboolean for success/failure Return GL_FALSE if we failed to allocate the buffer. Then raise GL_OUT_OF_MEMORY in core Mesa. --- src/mesa/main/dd.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa/main/dd.h') diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index f02e868d4a..4400e166c6 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -783,9 +783,9 @@ struct dd_function_table { void (*DeleteBuffer)( GLcontext *ctx, struct gl_buffer_object *obj ); - void (*BufferData)( GLcontext *ctx, GLenum target, GLsizeiptrARB size, - const GLvoid *data, GLenum usage, - struct gl_buffer_object *obj ); + GLboolean (*BufferData)( GLcontext *ctx, GLenum target, GLsizeiptrARB size, + const GLvoid *data, GLenum usage, + struct gl_buffer_object *obj ); void (*BufferSubData)( GLcontext *ctx, GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data, -- cgit v1.2.3 From 10067e464132e6d484c34dd277da5eb5e21cf491 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 28 Aug 2009 15:37:25 -0700 Subject: ARB sync: Add infrastructure for glGetInteger64v --- src/mesa/main/dd.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/main/dd.h') diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 4400e166c6..3a59872b5a 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -766,6 +766,8 @@ struct dd_function_table { /** Return the value or values of a selected parameter */ GLboolean (*GetIntegerv)(GLcontext *ctx, GLenum pname, GLint *result); /** Return the value or values of a selected parameter */ + GLboolean (*GetInteger64v)(GLcontext *ctx, GLenum pname, GLint64 *result); + /** Return the value or values of a selected parameter */ GLboolean (*GetPointerv)(GLcontext *ctx, GLenum pname, GLvoid **result); /*@}*/ -- cgit v1.2.3 From f37070bab6af350caec905ea7658e9241042b6cc Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 28 Aug 2009 20:10:05 -0700 Subject: ARB sync: Add support for GL_ARB_sync to swrast This isn't quite right yet. The delete behavior and the context clean-up needs some work. --- src/mesa/main/dd.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/mesa/main/dd.h') diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 3a59872b5a..4a700b5cb4 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -1044,6 +1044,22 @@ struct dd_function_table { */ void (*EndCallList)( GLcontext *ctx ); + +#if FEATURE_ARB_sync + /** + * \name GL_ARB_sync interfaces + */ + /*@{*/ + struct gl_sync_object * (*NewSyncObject)(GLcontext *, GLenum); + void (*FenceSync)(GLcontext *, struct gl_sync_object *, GLenum, GLbitfield); + void (*DeleteSyncObject)(GLcontext *, struct gl_sync_object *); + void (*CheckSync)(GLcontext *, struct gl_sync_object *); + void (*ClientWaitSync)(GLcontext *, struct gl_sync_object *, + GLbitfield, GLuint64); + void (*ServerWaitSync)(GLcontext *, struct gl_sync_object *, + GLbitfield, GLuint64); + /*@}*/ +#endif }; -- cgit v1.2.3