svga: Use utility functions to help determine whether we can use copy_region
[mesa.git] / src / gallium / drivers / svga / svga_pipe_query.c
index 5de3937474ea9dcf4c5ba8c5fcd50827470a618f..06c0c811ec96e8fa5797afbb8ceb9c85113c7e08 100644 (file)
@@ -1193,7 +1193,7 @@ svga_get_query_result(struct pipe_context *pipe,
 
 static void
 svga_render_condition(struct pipe_context *pipe, struct pipe_query *q,
-                      boolean condition, uint mode)
+                      boolean condition, enum pipe_render_cond_flag mode)
 {
    struct svga_context *svga = svga_context(pipe);
    struct svga_winsys_screen *sws = svga_screen(svga->pipe.screen)->sws;
@@ -1239,7 +1239,11 @@ svga_render_condition(struct pipe_context *pipe, struct pipe_query *q,
          ret = SVGA3D_vgpu10_SetPredication(svga->swc, queryId,
                                             (uint32) condition);
       }
+      svga->pred.query_id = queryId;
+      svga->pred.cond = condition;
    }
+
+   svga->render_condition = (sq != NULL);
 }