diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-12-17 03:40:28 +0100 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-12-17 03:40:28 +0100 |
commit | ef9a82038acd73936830671dbe43205c28a2151d (patch) | |
tree | 90be2cdd9f48750c18b669ca2ab9553575d9f822 /src/gallium/drivers/nouveau/nv50/nv50_state_validate.c | |
parent | f84f60446aebaeee8a1df741328cbd4a30dd24ea (diff) | |
parent | 743c2327b167b95046e02af4c7b2f7a282a0943d (diff) | |
download | external_mesa3d-replicant-6.0-old.zip external_mesa3d-replicant-6.0-old.tar.gz external_mesa3d-replicant-6.0-old.tar.bz2 |
Merge remote-tracking branch 'androidx86/marshmallow-x86' into replicant-6.0replicant-6.0-beta-0001replicant-6.0-alpha-0006replicant-6.0-old
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50/nv50_state_validate.c')
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_state_validate.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_state_validate.c b/src/gallium/drivers/nouveau/nv50/nv50_state_validate.c index 65f7338..a67a390 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_state_validate.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_state_validate.c @@ -1,5 +1,6 @@ #include "util/u_format.h" +#include "util/u_viewport.h" #include "nv50/nv50_context.h" @@ -265,8 +266,12 @@ nv50_validate_viewport(struct nv50_context *nv50) PUSH_DATAf(push, vpt->scale[1]); PUSH_DATAf(push, vpt->scale[2]); - zmin = vpt->translate[2] - fabsf(vpt->scale[2]); - zmax = vpt->translate[2] + fabsf(vpt->scale[2]); + /* If the halfz setting ever changes, the viewports will also get + * updated. The rast will get updated before the validate function has a + * chance to hit, so we can just use it directly without an atom + * dependency. + */ + util_viewport_zmin_zmax(vpt, nv50->rast->pipe.clip_halfz, &zmin, &zmax); #ifdef NV50_SCISSORS_CLIPPING BEGIN_NV04(push, NV50_3D(DEPTH_RANGE_NEAR(i)), 2); |