gallium: pipe_context::render_condition() and mode flags
authorBrian Paul <brianp@vmware.com>
Thu, 31 Dec 2009 21:44:40 +0000 (14:44 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 31 Dec 2009 21:45:15 +0000 (14:45 -0700)
For conditional rendering predicated on results of an occlusion query.

If this driver function is NULL, conditional rendering is not supported by
the driver.

src/gallium/include/pipe/p_context.h
src/gallium/include/pipe/p_defines.h

index 6c06fb9027041dfdebeb006f5d1404d7b7ef93f1..60fa9cef82492fdcfd05b051e9f9e12ab99aa24b 100644 (file)
@@ -84,6 +84,14 @@ struct pipe_context {
                                    unsigned count);
    /*@}*/
 
+   /**
+    * Predicate subsequent rendering on occlusion query result
+    * \param query  the query predicate, or NULL if no predicate
+    * \param mode  one of PIPE_COND_RENDER_x
+    */
+   void (*render_condition)( struct pipe_context *pipe,
+                             struct pipe_query *query,
+                             uint mode );
 
    /**
     * Query objects
index 2cda408fecc877a6a48db218db0f9f38064c14a8..c3b1e634ffc8121cbcb02650e5a41fb96142cbdd 100644 (file)
@@ -354,6 +354,15 @@ enum pipe_transfer_usage {
 #define PIPE_QUERY_TYPES                 3
 
 
+/**
+ * Conditional rendering modes
+ */
+#define PIPE_RENDER_COND_WAIT              0
+#define PIPE_RENDER_COND_NO_WAIT           1
+#define PIPE_RENDER_COND_BY_REGION_WAIT    2
+#define PIPE_RENDER_COND_BY_REGION_NO_WAIT 3
+
+
 /**
  * Point sprite coord modes
  */