gallium: add BIND flags for R/W buffers and images
[mesa.git] / src / gallium / include / pipe / p_context.h
index af5674ff7535976e6bc78cb345ef2cd716daf04a..d2c2e4c8d144681f7b9b65ad6d4123f8e9b55746 100644 (file)
@@ -115,7 +115,7 @@ struct pipe_context {
    void (*destroy_query)(struct pipe_context *pipe,
                          struct pipe_query *q);
 
-   void (*begin_query)(struct pipe_context *pipe, struct pipe_query *q);
+   boolean (*begin_query)(struct pipe_context *pipe, struct pipe_query *q);
    void (*end_query)(struct pipe_context *pipe, struct pipe_query *q);
 
    /**
@@ -170,6 +170,16 @@ struct pipe_context {
    void   (*bind_gs_state)(struct pipe_context *, void *);
    void   (*delete_gs_state)(struct pipe_context *, void *);
 
+   void * (*create_tcs_state)(struct pipe_context *,
+                              const struct pipe_shader_state *);
+   void   (*bind_tcs_state)(struct pipe_context *, void *);
+   void   (*delete_tcs_state)(struct pipe_context *, void *);
+
+   void * (*create_tes_state)(struct pipe_context *,
+                              const struct pipe_shader_state *);
+   void   (*bind_tes_state)(struct pipe_context *, void *);
+   void   (*delete_tes_state)(struct pipe_context *, void *);
+
    void * (*create_vertex_elements_state)(struct pipe_context *,
                                           unsigned num_elements,
                                           const struct pipe_vertex_element *);
@@ -221,6 +231,10 @@ struct pipe_context {
                              unsigned start_slot, unsigned num_views,
                              struct pipe_sampler_view **);
 
+   void (*set_tess_state)(struct pipe_context *,
+                          const float default_outer_level[4],
+                          const float default_inner_level[2]);
+
    /**
     * Bind an array of shader resources that will be used by the
     * graphics pipeline.  Any resources that were previously bound to
@@ -347,8 +361,14 @@ struct pipe_context {
                         const void *clear_value,
                         int clear_value_size);
 
-   /** Flush draw commands
+   /**
+    * Flush draw commands
+    *
+    * NOTE: use screen->fence_reference() (or equivalent) to transfer
+    * new fence ref to **fence, to ensure that previous fence is unref'd
     *
+    * \param fence  if not NULL, an old fence to unref and transfer a
+    *    new fence reference to
     * \param flags  bitfield of enum pipe_flush_flags values.
     */
    void (*flush)(struct pipe_context *pipe,
@@ -551,6 +571,21 @@ struct pipe_context {
     */
    void (*flush_resource)(struct pipe_context *ctx,
                           struct pipe_resource *resource);
+
+   /**
+    * Invalidate the contents of the resource.
+    *
+    * This is used to implement EGL's semantic of undefined depth/stencil
+    * contenst after a swapbuffers.  This allows a tiled renderer (for
+    * example) to not store the depth buffer.
+    */
+   void (*invalidate_resource)(struct pipe_context *ctx,
+                               struct pipe_resource *resource);
+
+   /**
+    * Return information about unexpected device resets.
+    */
+   enum pipe_reset_status (*get_device_reset_status)(struct pipe_context *ctx);
 };