Module: Mesa
Branch: master
Commit: f09ee76c9892dc9ddbd4f74c485c4be8b55033a7
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f09ee76c9892dc9ddbd4f74c485c4be8b55033a7

Author: Christoph Bumiller <e0425...@student.tuwien.ac.at>
Date:   Sat May 26 13:54:55 2012 +0200

nvc0: don't upload UCPs if the shader doesn't use them

---

 src/gallium/drivers/nvc0/nvc0_state_validate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/nvc0/nvc0_state_validate.c 
b/src/gallium/drivers/nvc0/nvc0_state_validate.c
index e35aae5..0f92614 100644
--- a/src/gallium/drivers/nvc0/nvc0_state_validate.c
+++ b/src/gallium/drivers/nvc0/nvc0_state_validate.c
@@ -308,7 +308,7 @@ nvc0_validate_clip(struct nvc0_context *nvc0)
       nvc0_check_program_ucps(nvc0, vp, clip_enable);
 
    if (nvc0->dirty & (NVC0_NEW_CLIP | (NVC0_NEW_VERTPROG << stage)))
-      if (vp->vp.num_ucps <= PIPE_MAX_CLIP_PLANES)
+      if (vp->vp.num_ucps > 0 && vp->vp.num_ucps <= PIPE_MAX_CLIP_PLANES)
          nvc0_upload_uclip_planes(nvc0, stage);
 
    clip_enable &= vp->vp.clip_enable;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to