Mesa (lp-binning): llvmpipe: comments and minor clean-ups

Brian Paul brianp at kemper.freedesktop.org
Fri Dec 4 12:04:59 PST 2009


Module: Mesa
Branch: lp-binning
Commit: 49a720c5cdfb500c323ae2411b39f4609d14f021
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=49a720c5cdfb500c323ae2411b39f4609d14f021

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Dec  4 12:59:34 2009 -0700

llvmpipe: comments and minor clean-ups

---

 src/gallium/drivers/llvmpipe/lp_rast.h          |   27 ++++++++++++++++------
 src/gallium/drivers/llvmpipe/lp_setup_context.h |    7 ++++++
 2 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h
index 307c45c..21bbf10 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast.h
@@ -25,12 +25,22 @@
  *
  **************************************************************************/
 
+/**
+ * The rast code is concerned with rasterization of command bins.
+ * Each screen tile has a bin associated with it.  To render the
+ * scene we iterate over the tile bins and execute the commands
+ * in each bin.
+ * We'll do that with multiple threads...
+ */
+
+
 #ifndef LP_RAST_H
 #define LP_RAST_H
 
 #include "pipe/p_compiler.h"
 #include "lp_jit.h"
 
+
 /* Initially create and program a single rasterizer directly.  Later
  * will want multiple of these, one or two per core.  At that stage
  * will probably pass command buffers into the rasterizers rather than
@@ -57,7 +67,6 @@ struct lp_rast_state {
     * the tile color/z/stencil data somehow:
     */
    lp_jit_frag_func jit_function;
-
 };
 
 
@@ -121,6 +130,9 @@ struct lp_rast_triangle {
 
 struct lp_rasterizer *lp_rast_create( struct pipe_screen *screen );
 
+void lp_rast_destroy( struct lp_rasterizer * );
+
+
 boolean lp_rast_begin( struct lp_rasterizer *rast,
                        struct pipe_surface *cbuf,
                        struct pipe_surface *zsbuf,
@@ -147,6 +159,7 @@ union lp_rast_cmd_arg {
    unsigned clear_zstencil;
 };
 
+
 /* Cast wrappers.  Hopefully these compile to noops!
  */
 static INLINE const union lp_rast_cmd_arg
@@ -183,10 +196,12 @@ lp_rast_arg_null( void )
 
 
 
-
-
-/* Binnable Commands:
+/**
+ * Binnable Commands.
+ * These get put into bins by the setup code and are called when
+ * the bins are executed.
  */
+
 void lp_rast_clear_color( struct lp_rasterizer *, 
                           const union lp_rast_cmd_arg );
 
@@ -214,9 +229,5 @@ void lp_rast_shade_tile( struct lp_rasterizer *,
 
 void lp_rast_end_tile( struct lp_rasterizer *rast );
 
-/* Shutdown:
- */
-void lp_rast_destroy( struct lp_rasterizer * );
-
 
 #endif
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_context.h b/src/gallium/drivers/llvmpipe/lp_setup_context.h
index 5abe66f..180b8f6 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_context.h
+++ b/src/gallium/drivers/llvmpipe/lp_setup_context.h
@@ -25,6 +25,13 @@
  *
  **************************************************************************/
 
+
+/**
+ * The setup code is concerned with point/line/triangle setup and
+ * putting commands/data into the bins.
+ */
+
+
 #ifndef LP_SETUP_CONTEXT_H
 #define LP_SETUP_CONTEXT_H
 



More information about the mesa-commit mailing list