svga: add some debug_printf() calls in the query object code
authorBrian Paul <brianp@vmware.com>
Mon, 24 Mar 2014 23:20:54 +0000 (17:20 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 26 Mar 2014 16:31:13 +0000 (10:31 -0600)
To help debug failures.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/drivers/svga/svga_pipe_query.c

index 61085c463e531329fe7fc129016686208d51e9da..cdf463c17814983b394f03c7ecda558052bc7320 100644 (file)
@@ -94,13 +94,17 @@ svga_create_query( struct pipe_context *pipe, unsigned query_type )
       sq->hwbuf = svga_winsys_buffer_create(svga, 1,
                                             SVGA_BUFFER_USAGE_PINNED,
                                             sizeof *sq->queryResult);
-      if (!sq->hwbuf)
+      if (!sq->hwbuf) {
+         debug_printf("svga: failed to alloc query object!\n");
          goto no_hwbuf;
+      }
 
       sq->queryResult = (SVGA3dQueryResult *)
          sws->buffer_map(sws, sq->hwbuf, PIPE_TRANSFER_WRITE);
-      if (!sq->queryResult)
+      if (!sq->queryResult) {
+         debug_printf("svga: failed to map query object!\n");
          goto no_query_result;
+      }
 
       sq->queryResult->totalSize = sizeof *sq->queryResult;
       sq->queryResult->state = SVGA3D_QUERYSTATE_NEW;