u_blitter: rename blitter->base, add a way to get a pipe context from blitter
[mesa.git] / src / gallium / auxiliary / util / u_blitter.h
index f421ad5b9380f450e89a8a4565050972dbf399b2..ffcf5c79843b7909d90f8d9572acd8503644ed44 100644 (file)
@@ -42,6 +42,8 @@ struct pipe_context;
 struct blitter_context
 {
    /* Private members, really. */
+   struct pipe_context *pipe; /**< pipe context */
+
    void *saved_blend_state;   /**< blend state */
    void *saved_dsa_state;     /**< depth stencil alpha state */
    void *saved_velem_state;   /**< vertex elements state */
@@ -73,6 +75,15 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe);
  */
 void util_blitter_destroy(struct blitter_context *blitter);
 
+/**
+ * Return the pipe context associated with a blitter context.
+ */
+static INLINE
+struct pipe_context *util_blitter_get_pipe(struct blitter_context *blitter)
+{
+   return blitter->pipe;
+}
+
 /*
  * These CSOs must be saved before any of the following functions is called:
  * - blend state