mesa: skip checking for identity matrix in glMultMatrixf with glthread

glMultMatrixf was doing it. glMatrixMultfEXT is the other user of
matrix_mult that needs to do it before we can skip it here.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26548>
This commit is contained in:
Marek Olšák 2023-11-26 22:24:23 -05:00 committed by Marge Bot
parent d321b1500b
commit 5fb106c253
2 changed files with 5 additions and 2 deletions

View file

@ -26,7 +26,8 @@
<param name="matrixMode" type="GLenum" />
<param name="m" type="const GLdouble *" count="16"/>
</function>
<function name="MatrixMultfEXT" offset="assign" exec="dlist">
<function name="MatrixMultfEXT" offset="assign" exec="dlist"
marshal_call_before="if (_mesa_matrix_is_identity(m)) return;">
<param name="matrixMode" type="GLenum" />
<param name="m" type="const GLfloat *" count="16"/>
</function>

View file

@ -569,7 +569,9 @@ static void
matrix_mult(struct gl_matrix_stack *stack, const GLfloat *m, const char* caller)
{
GET_CURRENT_CONTEXT(ctx);
if (!m || _mesa_matrix_is_identity(m))
/* glthread filters out identity matrices, so don't do it again. */
if (!m || (!ctx->GLThread.enabled && _mesa_matrix_is_identity(m)))
return;
if (MESA_VERBOSE & VERBOSE_API)