summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_rast.h
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-10-09 11:29:01 +0100
committerKeith Whitwell <[email protected]>2009-10-09 11:29:01 +0100
commit4cdd10cb4b60d85f6c231a26739f7d5e264a05e5 (patch)
tree7767c462db3b3ce5e5ba445ceb15c8ddbaba2a3c /src/gallium/drivers/llvmpipe/lp_rast.h
parent415b271b5100d64579690111bc8eb549866865a7 (diff)
llvmpipe: use union lp_cmd_rast_arg directly, rather than through a pointer
The union itself consists of pointers. We don't need to be passing pointer to pointers.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_rast.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.h54
1 files changed, 45 insertions, 9 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h
index aa50fba5a60..44cb4032dad 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast.h
@@ -134,34 +134,70 @@ union lp_rast_cmd_arg {
const struct lp_rast_shader_inputs *shade_tile;
const struct lp_rast_triangle *triangle;
const struct lp_rast_state *set_state;
- const uint8_t clear_color[4];
+ uint8_t clear_color[4];
unsigned clear_zstencil;
};
+/* Cast wrappers. Hopefully these compile to noops!
+ */
+static INLINE const union lp_rast_cmd_arg
+lp_rast_arg_inputs( const struct lp_rast_shader_inputs *shade_tile )
+{
+ union lp_rast_cmd_arg arg;
+ arg.shade_tile = shade_tile;
+ return arg;
+}
+
+static INLINE const union lp_rast_cmd_arg
+lp_rast_arg_triangle( const struct lp_rast_triangle *triangle )
+{
+ union lp_rast_cmd_arg arg;
+ arg.triangle = triangle;
+ return arg;
+}
+
+static INLINE const union lp_rast_cmd_arg
+lp_rast_arg_state( const struct lp_rast_state *state )
+{
+ union lp_rast_cmd_arg arg;
+ arg.set_state = state;
+ return arg;
+}
+
+static INLINE const union lp_rast_cmd_arg
+lp_rast_arg_null( void )
+{
+ union lp_rast_cmd_arg arg;
+ arg.set_state = NULL;
+ return arg;
+}
+
+
+
+
/* Binnable Commands:
*/
void lp_rast_clear_color( struct lp_rasterizer *,
- const union lp_rast_cmd_arg *);
+ const union lp_rast_cmd_arg );
void lp_rast_clear_zstencil( struct lp_rasterizer *,
- const union lp_rast_cmd_arg *);
+ const union lp_rast_cmd_arg );
void lp_rast_load_color( struct lp_rasterizer *,
- const union lp_rast_cmd_arg *);
+ const union lp_rast_cmd_arg );
void lp_rast_load_zstencil( struct lp_rasterizer *,
- const union lp_rast_cmd_arg *);
+ const union lp_rast_cmd_arg );
void lp_rast_set_state( struct lp_rasterizer *,
- const union lp_rast_cmd_arg * );
+ const union lp_rast_cmd_arg );
void lp_rast_triangle( struct lp_rasterizer *,
- const union lp_rast_cmd_arg * );
+ const union lp_rast_cmd_arg );
void lp_rast_shade_tile( struct lp_rasterizer *,
- const union lp_rast_cmd_arg *,
- const struct lp_rast_shader_inputs *);
+ const union lp_rast_cmd_arg );
/* End of tile: