summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_scene.h
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-03-02 14:41:35 +0000
committerKeith Whitwell <keithw@vmware.com>2010-03-02 15:03:09 +0000
commit5fe2ce28b6e9fba181c13c6f49b57b3dd68fe88e (patch)
treea66aa837465bbf79a7b23851e0cca0adacf1db36 /src/gallium/drivers/llvmpipe/lp_scene.h
parent8417528e3a5b9f2aed783222091ca96b56e8c37a (diff)
llvmpipe: reorganize transfer usage
Move transfer creation and mapping to the "scene" object, and out of the rasterizer. The rasterizer operates on already-mapped framebuffers only, and no longer needs a screen or context pointer. The scene object has access to a pipe_context, and this reorg prepares for moving transfer functionality from the screen to the context.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_scene.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_scene.h34
1 files changed, 26 insertions, 8 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.h b/src/gallium/drivers/llvmpipe/lp_scene.h
index 8d725cd437..739ac22908 100644
--- a/src/gallium/drivers/llvmpipe/lp_scene.h
+++ b/src/gallium/drivers/llvmpipe/lp_scene.h
@@ -39,6 +39,7 @@
#include "lp_tile_soa.h"
#include "lp_rast.h"
+struct lp_scene_queue;
/* We're limited to 2K by 2K for 32bit fixed point rasterization.
* Will need a 64-bit version for larger framebuffers.
@@ -112,8 +113,14 @@ struct texture_ref {
* scenes:
*/
struct lp_scene {
- struct cmd_bin tile[TILES_X][TILES_Y];
- struct data_block_list data;
+ struct pipe_context *pipe;
+ struct pipe_transfer *cbuf_transfer[PIPE_MAX_COLOR_BUFS];
+ struct pipe_transfer *zsbuf_transfer;
+
+ /* Scene's buffers are mapped at the time the scene is enqueued:
+ */
+ void *cbuf_map[PIPE_MAX_COLOR_BUFS];
+ uint8_t *zsbuf_map;
/** the framebuffer to render the scene into */
struct pipe_framebuffer_state fb;
@@ -131,25 +138,28 @@ struct lp_scene {
int curr_x, curr_y; /**< for iterating over bins */
pipe_mutex mutex;
+
+ /* Where to place this scene once it has been rasterized:
+ */
+ struct lp_scene_queue *empty_queue;
+
+ struct cmd_bin tile[TILES_X][TILES_Y];
+ struct data_block_list data;
};
-struct lp_scene *lp_scene_create(void);
+struct lp_scene *lp_scene_create(struct pipe_context *pipe,
+ struct lp_scene_queue *empty_queue);
void lp_scene_destroy(struct lp_scene *scene);
-void lp_scene_init(struct lp_scene *scene);
boolean lp_scene_is_empty(struct lp_scene *scene );
void lp_scene_reset(struct lp_scene *scene );
-void lp_scene_free_bin_data(struct lp_scene *scene);
-
-void lp_scene_set_framebuffer_size( struct lp_scene *scene,
- unsigned width, unsigned height );
void lp_bin_new_data_block( struct data_block_list *list );
@@ -296,5 +306,13 @@ lp_scene_bin_iter_begin( struct lp_scene *scene );
struct cmd_bin *
lp_scene_bin_iter_next( struct lp_scene *scene, int *bin_x, int *bin_y );
+void
+lp_scene_rasterize( struct lp_scene *scene,
+ struct lp_rasterizer *rast,
+ boolean write_depth );
+
+void
+lp_scene_begin_binning( struct lp_scene *scene,
+ struct pipe_framebuffer_state *fb );
#endif /* LP_BIN_H */