mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
mesa: skip glMultMatrix if the matrix is identity
This happens a lot with viewperf and it causes unnecessary constant buffer updates. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
This commit is contained in:
parent
7b50332aef
commit
b1982fd3d2
1 changed files with 6 additions and 1 deletions
|
|
@ -554,7 +554,12 @@ static void
|
|||
matrix_mult(struct gl_matrix_stack *stack, const GLfloat *m, const char* caller)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
if (!m) return;
|
||||
if (!m ||
|
||||
(m[0] == 1 && m[1] == 0 && m[2] == 0 && m[3] == 0 &&
|
||||
m[4] == 0 && m[5] == 1 && m[6] == 0 && m[7] == 0 &&
|
||||
m[8] == 0 && m[9] == 0 && m[10] == 1 && m[11] == 0 &&
|
||||
m[12] == 0 && m[13] == 0 && m[14] == 0 && m[15] == 1))
|
||||
return;
|
||||
if (MESA_VERBOSE & VERBOSE_API)
|
||||
_mesa_debug(ctx,
|
||||
"%s(%f %f %f %f, %f %f %f %f, %f %f %f %f, %f %f %f %f\n",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue