[Mesa-dev] [PATCH 2/3] mesa/glthread: enable immediate mode
Timothy Arceri
tarceri at itsqueeze.com
Wed Nov 21 00:09:39 UTC 2018
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
On 10/11/18 5:29 pm, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> ---
> src/mapi/glapi/gen/gl_API.xml | 2 +-
> src/mesa/vbo/vbo_exec_api.c | 14 ++++++++++----
> 2 files changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
> index aae9a5835db..929e5f6b024 100644
> --- a/src/mapi/glapi/gen/gl_API.xml
> +++ b/src/mapi/glapi/gen/gl_API.xml
> @@ -1141,21 +1141,21 @@
> <param name="range" type="GLsizei"/>
> <return type="GLuint"/>
> <glx sop="104"/>
> </function>
>
> <function name="ListBase" deprecated="3.1">
> <param name="base" type="GLuint"/>
> <glx rop="3"/>
> </function>
>
> - <function name="Begin" deprecated="3.1" exec="dynamic" marshal_fail="true">
> + <function name="Begin" deprecated="3.1" exec="dynamic">
> <param name="mode" type="GLenum"/>
> <glx rop="4"/>
> </function>
>
> <function name="Bitmap" deprecated="3.1">
> <param name="width" type="GLsizei"/>
> <param name="height" type="GLsizei"/>
> <param name="xorig" type="GLfloat"/>
> <param name="yorig" type="GLfloat"/>
> <param name="xmove" type="GLfloat"/>
> diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
> index 24bd1f0ba14..e46922ef859 100644
> --- a/src/mesa/vbo/vbo_exec_api.c
> +++ b/src/mesa/vbo/vbo_exec_api.c
> @@ -796,25 +796,28 @@ vbo_exec_Begin(GLenum mode)
> exec->vtx.prim[i].pad = 0;
> exec->vtx.prim[i].start = exec->vtx.vert_count;
> exec->vtx.prim[i].count = 0;
> exec->vtx.prim[i].num_instances = 1;
> exec->vtx.prim[i].base_instance = 0;
> exec->vtx.prim[i].is_indirect = 0;
>
> ctx->Driver.CurrentExecPrimitive = mode;
>
> ctx->Exec = ctx->BeginEnd;
> +
> /* We may have been called from a display list, in which case we should
> * leave dlist.c's dispatch table in place.
> */
> - if (ctx->CurrentClientDispatch == ctx->OutsideBeginEnd) {
> - ctx->CurrentClientDispatch = ctx->BeginEnd;
> + if (ctx->CurrentClientDispatch == ctx->MarshalExec) {
> + ctx->CurrentServerDispatch = ctx->Exec;
> + } else if (ctx->CurrentClientDispatch == ctx->OutsideBeginEnd) {
> + ctx->CurrentClientDispatch = ctx->Exec;
> _glapi_set_dispatch(ctx->CurrentClientDispatch);
> } else {
> assert(ctx->CurrentClientDispatch == ctx->Save);
> }
> }
>
>
> /**
> * Try to merge / concatenate the two most recent VBO primitives.
> */
> @@ -851,22 +854,25 @@ vbo_exec_End(void)
> {
> GET_CURRENT_CONTEXT(ctx);
> struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
>
> if (!_mesa_inside_begin_end(ctx)) {
> _mesa_error(ctx, GL_INVALID_OPERATION, "glEnd");
> return;
> }
>
> ctx->Exec = ctx->OutsideBeginEnd;
> - if (ctx->CurrentClientDispatch == ctx->BeginEnd) {
> - ctx->CurrentClientDispatch = ctx->OutsideBeginEnd;
> +
> + if (ctx->CurrentClientDispatch == ctx->MarshalExec) {
> + ctx->CurrentServerDispatch = ctx->Exec;
> + } else if (ctx->CurrentClientDispatch == ctx->BeginEnd) {
> + ctx->CurrentClientDispatch = ctx->Exec;
> _glapi_set_dispatch(ctx->CurrentClientDispatch);
> }
>
> if (exec->vtx.prim_count > 0) {
> /* close off current primitive */
> struct _mesa_prim *last_prim = &exec->vtx.prim[exec->vtx.prim_count - 1];
>
> last_prim->end = 1;
> last_prim->count = exec->vtx.vert_count - last_prim->start;
>
>
More information about the mesa-dev
mailing list