summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_setup_context.h
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-01-06 16:44:43 +0000
committerKeith Whitwell <keithw@vmware.com>2010-01-06 16:44:43 +0000
commit5ce0380a0f585b9e1fb616b749f7fd18a8afada1 (patch)
tree0c7ba3835c94a8fe7c9c392c387209a3f5350a21 /src/gallium/drivers/llvmpipe/lp_setup_context.h
parent6a7b6a530dd7740457d4bdd3b804c6eabff4e1b3 (diff)
llvmpipe: merge setup and draw vbuf submodules
The setup tiling engine is now plugged directly into the draw module as a rendering backend. Removed a couple of layering violations such that the setup code no longer reaches out into the surrounding llvmpipe state or context.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup_context.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_context.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_context.h b/src/gallium/drivers/llvmpipe/lp_setup_context.h
index f6604a8034..d2278a46e6 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_context.h
+++ b/src/gallium/drivers/llvmpipe/lp_setup_context.h
@@ -40,6 +40,7 @@
#include "lp_tile_soa.h" /* for TILE_SIZE */
#include "lp_scene.h"
+#include "draw/draw_vbuf.h"
#define LP_SETUP_NEW_FS 0x01
#define LP_SETUP_NEW_CONSTANTS 0x02
@@ -53,15 +54,31 @@ struct lp_scene_queue;
* Point/line/triangle setup context.
* Note: "stored" below indicates data which is stored in the bins,
* not arbitrary malloc'd memory.
+ *
+ *
+ * Subclass of vbuf_render, plugged directly into the draw module as
+ * the rendering backend.
*/
-struct setup_context {
-
+struct setup_context
+{
+ struct vbuf_render base;
+
+ struct vertex_info *vertex_info;
+ uint prim;
+ uint vertex_size;
+ uint nr_vertices;
+ uint vertex_buffer_size;
+ void *vertex_buffer;
+
+ /* Final pipeline stage for draw module. Draw module should
+ * create/install this itself now.
+ */
+ struct draw_stage *vbuf;
struct lp_rasterizer *rast;
-
-
struct lp_scene *scene; /**< current scene */
struct lp_scene_queue *empty_scenes; /**< queue of empty scenes */
+ boolean flatshade_first;
boolean ccw_is_frontface;
unsigned cullmode;
@@ -120,4 +137,8 @@ void lp_setup_choose_point( struct setup_context *setup );
struct lp_scene *lp_setup_get_current_scene(struct setup_context *setup);
+void lp_setup_init_vbuf(struct setup_context *setup);
+
+void lp_setup_update_state( struct setup_context *setup );
+
#endif