Mesa (master): tnl: use buffer helper functions to improve readbility

Brian Paul brianp at kemper.freedesktop.org
Tue Aug 30 09:18:32 PDT 2011


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

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Aug 30 09:44:47 2011 -0600

tnl: use buffer helper functions to improve readbility

---

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

diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c
index 86af4b7..a5225c4 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/bufferobj.h"
 #include "main/condrender.h"
 #include "main/context.h"
 #include "main/imports.h"
@@ -346,7 +347,8 @@ static void bind_indices( struct gl_context *ctx,
       return;
    }
 
-   if (ib->obj->Name && !ib->obj->Pointer) {
+   if (_mesa_is_bufferobj(ib->obj) && !_mesa_bufferobj_mapped(ib->obj)) {
+      /* if the buffer object isn't mapped yet, map it now */
       unsigned map_size;
 
       switch (ib->type) {



More information about the mesa-commit mailing list