From 49a720c5cdfb500c323ae2411b39f4609d14f021 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 4 Dec 2009 12:59:34 -0700 Subject: 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(-) (limited to 'src/gallium') diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h index 307c45cb9f..21bbf104b1 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 5abe66f586..180b8f6e88 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 -- cgit v1.2.3