mesa: handle PBO access error in display list mode
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Wed, 19 Oct 2011 03:20:18 +0000 (11:20 +0800)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Thu, 20 Oct 2011 03:42:54 +0000 (11:42 +0800)
Simply generate GL_INVALID_OPERATION error at display list mode. As
explained by Brian, we are going to access PBO data at compile time.
No need to defer the error at execution time.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/dlist.c

index 625649e..d901bdd 100644 (file)
@@ -939,7 +939,9 @@ unpack_image(struct gl_context *ctx, GLuint dimensions,
       }
       return image;
    }
+
    /* bad access! */
+   _mesa_error(ctx, GL_INVALID_OPERATION, "invalid PBO access");
    return NULL;
 }