Mesa (master): util/blitter: kill the draw_quad callback

Keith Whitwell keithw at kemper.freedesktop.org
Tue Dec 15 18:17:39 UTC 2009


Module: Mesa
Branch: master
Commit: 80e815639459367313cb0c2e5e32d978ed9fcd08
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=80e815639459367313cb0c2e5e32d978ed9fcd08

Author: Marek Olšák <maraeo at gmail.com>
Date:   Tue Dec 15 01:11:22 2009 +0100

util/blitter: kill the draw_quad callback

---

 src/gallium/auxiliary/util/u_blitter.c |   17 ++++++-----------
 src/gallium/auxiliary/util/u_blitter.h |   14 --------------
 2 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 42efa86..895af2c 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -385,20 +385,15 @@ static void blitter_set_texcoords_cube(struct blitter_context_priv *ctx,
 
 static void blitter_draw_quad(struct blitter_context_priv *ctx)
 {
-   struct blitter_context *blitter = &ctx->blitter;
    struct pipe_context *pipe = ctx->pipe;
 
-   if (blitter->draw_quad) {
-      blitter->draw_quad(pipe, &ctx->vertices[0][0][0]);
-   } else {
-      /* write vertices and draw them */
-      pipe_buffer_write(pipe->screen, ctx->vbuf,
-                        0, sizeof(ctx->vertices), ctx->vertices);
+   /* write vertices and draw them */
+   pipe_buffer_write(pipe->screen, ctx->vbuf,
+                     0, sizeof(ctx->vertices), ctx->vertices);
 
-      util_draw_vertex_buffer(ctx->pipe, ctx->vbuf, 0, PIPE_PRIM_TRIANGLE_FAN,
-                              4,  /* verts */
-                              2); /* attribs/vert */
-   }
+   util_draw_vertex_buffer(pipe, ctx->vbuf, 0, PIPE_PRIM_TRIANGLE_FAN,
+                           4,  /* verts */
+                           2); /* attribs/vert */
 }
 
 static INLINE
diff --git a/src/gallium/auxiliary/util/u_blitter.h b/src/gallium/auxiliary/util/u_blitter.h
index e4cbb5c..3da5a6c 100644
--- a/src/gallium/auxiliary/util/u_blitter.h
+++ b/src/gallium/auxiliary/util/u_blitter.h
@@ -40,20 +40,6 @@ struct pipe_context;
 
 struct blitter_context
 {
-   /**
-    * Draw a quad.
-    *
-    * The pipe driver can set this to provide a more efficient way of drawing
-    * a quad. If it's NULL, the quad is drawn using a vertex buffer.
-    *
-    * There are always 4 vertices with interleaved vertex elements of type
-    * RGBA32F. See the vertex shader _output_ semantics to know what those are.
-    * The primitive type is always PIPE_PRIM_TRIANGLE_FAN and VS/clip/viewport
-    * is bypasssed.
-    */
-   void (*draw_quad)(struct pipe_context *pipe,
-                     const float *vertices);
-
    /* Private members, really. */
    void *saved_blend_state;   /**< blend state */
    void *saved_dsa_state;     /**< depth stencil alpha state */




More information about the mesa-commit mailing list