mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-21 10:00:36 +01:00
mesa: short-circuit no-change in _mesa_DepthRange()
This commit is contained in:
parent
ace98f09e6
commit
b9f67df6e7
1 changed files with 4 additions and 0 deletions
|
|
@ -120,6 +120,10 @@ _mesa_DepthRange(GLclampd nearval, GLclampd farval)
|
|||
if (MESA_VERBOSE&VERBOSE_API)
|
||||
_mesa_debug(ctx, "glDepthRange %f %f\n", nearval, farval);
|
||||
|
||||
if (ctx->Viewport.Near == nearval &&
|
||||
ctx->Viewport.Far == farval)
|
||||
return;
|
||||
|
||||
ctx->Viewport.Near = (GLfloat) CLAMP(nearval, 0.0, 1.0);
|
||||
ctx->Viewport.Far = (GLfloat) CLAMP(farval, 0.0, 1.0);
|
||||
ctx->NewState |= _NEW_VIEWPORT;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue