llvmpipe: comments and minor clean-ups
authorBrian Paul <brianp@vmware.com>
Fri, 4 Dec 2009 19:59:34 +0000 (12:59 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 4 Dec 2009 19:59:34 +0000 (12:59 -0700)
src/gallium/drivers/llvmpipe/lp_rast.h
src/gallium/drivers/llvmpipe/lp_setup_context.h

index 307c45cb9fcdead0a7453c0676bb2e4cbc67e4bb..21bbf104b15db8977cdbec080038a1c9ffb5db5f 100644 (file)
  *
  **************************************************************************/
 
+/**
+ * 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
index 5abe66f5862aae82fe52dc632a21fbc305fa4e64..180b8f6e880c7512f8b5b2d9ebebd604843cafb2 100644 (file)
  *
  **************************************************************************/
 
+
+/**
+ * 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