llvmpipe: assert that we're putting data into a valid bin
authorBrian Paul <brianp@vmware.com>
Wed, 13 Jan 2010 00:11:40 +0000 (17:11 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 13 Jan 2010 00:11:40 +0000 (17:11 -0700)
src/gallium/drivers/llvmpipe/lp_scene.h

index 7255727785126f2f8991ba94cb7677fc22d26807..b59b6870026ec799afd606393e30c539ec3ae8aa 100644 (file)
@@ -227,6 +227,9 @@ lp_scene_bin_command( struct lp_scene *scene,
    struct cmd_bin *bin = lp_scene_get_bin(scene, x, y);
    struct cmd_block_list *list = &bin->commands;
 
+   assert(x < scene->tiles_x);
+   assert(y < scene->tiles_y);
+
    if (list->tail->count == CMD_BLOCK_MAX) {
       lp_bin_new_cmd_block( list );
    }