glthread: don't sync for more glGetIntegerv enums for glretrace
This makes glretrace faster with glthread. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13970>
This commit is contained in:
@@ -202,7 +202,8 @@
|
|||||||
<glx vendorpriv="1425"/>
|
<glx vendorpriv="1425"/>
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
<function name="BindFramebuffer" es2="2.0">
|
<function name="BindFramebuffer" es2="2.0"
|
||||||
|
marshal_call_after="if (target == GL_FRAMEBUFFER || target == GL_DRAW_FRAMEBUFFER) ctx->GLThread.CurrentDrawFramebuffer = framebuffer;">
|
||||||
<param name="target" type="GLenum"/>
|
<param name="target" type="GLenum"/>
|
||||||
<param name="framebuffer" type="GLuint"/>
|
<param name="framebuffer" type="GLuint"/>
|
||||||
<glx rop="236"/>
|
<glx rop="236"/>
|
||||||
|
@@ -5563,7 +5563,8 @@
|
|||||||
<glx ignore="true"/>
|
<glx ignore="true"/>
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
<function name="UseProgram" es2="2.0" no_error="true">
|
<function name="UseProgram" es2="2.0" no_error="true"
|
||||||
|
marshal_call_after="ctx->GLThread.CurrentProgram = program;">
|
||||||
<param name="program" type="GLuint"/>
|
<param name="program" type="GLuint"/>
|
||||||
<glx ignore="true"/>
|
<glx ignore="true"/>
|
||||||
</function>
|
</function>
|
||||||
|
@@ -207,6 +207,7 @@ struct glthread_state
|
|||||||
GLuint CurrentDrawIndirectBufferName;
|
GLuint CurrentDrawIndirectBufferName;
|
||||||
GLuint CurrentPixelPackBufferName;
|
GLuint CurrentPixelPackBufferName;
|
||||||
GLuint CurrentPixelUnpackBufferName;
|
GLuint CurrentPixelUnpackBufferName;
|
||||||
|
GLuint CurrentQueryBufferName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The batch index of the last occurence of glLinkProgram or
|
* The batch index of the last occurence of glLinkProgram or
|
||||||
@@ -230,6 +231,9 @@ struct glthread_state
|
|||||||
|
|
||||||
/** Enable states. */
|
/** Enable states. */
|
||||||
bool CullFace;
|
bool CullFace;
|
||||||
|
|
||||||
|
GLuint CurrentDrawFramebuffer;
|
||||||
|
GLuint CurrentProgram;
|
||||||
};
|
};
|
||||||
|
|
||||||
void _mesa_glthread_init(struct gl_context *ctx);
|
void _mesa_glthread_init(struct gl_context *ctx);
|
||||||
|
@@ -195,6 +195,9 @@ _mesa_glthread_BindBuffer(struct gl_context *ctx, GLenum target, GLuint buffer)
|
|||||||
case GL_PIXEL_UNPACK_BUFFER:
|
case GL_PIXEL_UNPACK_BUFFER:
|
||||||
glthread->CurrentPixelUnpackBufferName = buffer;
|
glthread->CurrentPixelUnpackBufferName = buffer;
|
||||||
break;
|
break;
|
||||||
|
case GL_QUERY_BUFFER:
|
||||||
|
glthread->CurrentQueryBufferName = buffer;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -43,13 +43,6 @@ _mesa_marshal_GetIntegerv(GLenum pname, GLint *p)
|
|||||||
* - CONTEXT_[A-Z]*(Const
|
* - CONTEXT_[A-Z]*(Const
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (ctx->API != API_OPENGL_COMPAT) {
|
|
||||||
/* glthread only tracks these states for the compatibility profile. */
|
|
||||||
_mesa_glthread_finish_before(ctx, "GetIntegerv");
|
|
||||||
CALL_GetIntegerv(ctx->CurrentServerDispatch, (pname, p));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (pname) {
|
switch (pname) {
|
||||||
case GL_ACTIVE_TEXTURE:
|
case GL_ACTIVE_TEXTURE:
|
||||||
*p = GL_TEXTURE0 + ctx->GLThread.ActiveTexture;
|
*p = GL_TEXTURE0 + ctx->GLThread.ActiveTexture;
|
||||||
@@ -66,9 +59,24 @@ _mesa_marshal_GetIntegerv(GLenum pname, GLint *p)
|
|||||||
case GL_CLIENT_ATTRIB_STACK_DEPTH:
|
case GL_CLIENT_ATTRIB_STACK_DEPTH:
|
||||||
*p = ctx->GLThread.ClientAttribStackTop;
|
*p = ctx->GLThread.ClientAttribStackTop;
|
||||||
return;
|
return;
|
||||||
|
case GL_CURRENT_PROGRAM:
|
||||||
|
*p = ctx->GLThread.CurrentProgram;
|
||||||
|
return;
|
||||||
case GL_DRAW_INDIRECT_BUFFER_BINDING:
|
case GL_DRAW_INDIRECT_BUFFER_BINDING:
|
||||||
*p = ctx->GLThread.CurrentDrawIndirectBufferName;
|
*p = ctx->GLThread.CurrentDrawIndirectBufferName;
|
||||||
return;
|
return;
|
||||||
|
case GL_DRAW_FRAMEBUFFER_BINDING: /* == GL_FRAMEBUFFER_BINDING */
|
||||||
|
*p = ctx->GLThread.CurrentDrawFramebuffer;
|
||||||
|
return;
|
||||||
|
case GL_PIXEL_PACK_BUFFER_BINDING:
|
||||||
|
*p = ctx->GLThread.CurrentPixelPackBufferName;
|
||||||
|
return;
|
||||||
|
case GL_PIXEL_UNPACK_BUFFER_BINDING:
|
||||||
|
*p = ctx->GLThread.CurrentPixelUnpackBufferName;
|
||||||
|
return;
|
||||||
|
case GL_QUERY_BUFFER_BINDING:
|
||||||
|
*p = ctx->GLThread.CurrentQueryBufferName;
|
||||||
|
return;
|
||||||
|
|
||||||
case GL_MATRIX_MODE:
|
case GL_MATRIX_MODE:
|
||||||
*p = ctx->GLThread.MatrixMode;
|
*p = ctx->GLThread.MatrixMode;
|
||||||
|
Reference in New Issue
Block a user