Mesa (master): tnl: add check for conditional rendering

Brian Paul brianp at kemper.freedesktop.org
Thu Dec 31 07:54:56 PST 2009


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

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Dec 30 21:40:03 2009 -0700

tnl: add check for conditional rendering

---

 src/mesa/tnl/t_draw.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c
index 1c7c733..d31b29b 100644
--- a/src/mesa/tnl/t_draw.c
+++ b/src/mesa/tnl/t_draw.c
@@ -26,6 +26,7 @@
  */
 
 #include "main/glheader.h"
+#include "main/condrender.h"
 #include "main/context.h"
 #include "main/imports.h"
 #include "main/state.h"
@@ -386,6 +387,9 @@ void _tnl_draw_prims( GLcontext *ctx,
    GLuint max_basevertex = prim->basevertex;
    GLuint i;
 
+   if (!_mesa_check_conditional_render(ctx))
+      return; /* don't draw */
+
    for (i = 1; i < nr_prims; i++)
       max_basevertex = MAX2(max_basevertex, prim[i].basevertex);
 



More information about the mesa-commit mailing list