projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r300g: add RGBA16F colorbuffer support
[mesa.git]
/
src
/
gallium
/
drivers
/
llvmpipe
/
lp_scene.h
diff --git
a/src/gallium/drivers/llvmpipe/lp_scene.h
b/src/gallium/drivers/llvmpipe/lp_scene.h
index 4b6527d67c75f9efd6c0b4b76a6abf779e782777..b602b1e8a05c31569d8c25ddeca0bd8391adcce8 100644
(file)
--- a/
src/gallium/drivers/llvmpipe/lp_scene.h
+++ b/
src/gallium/drivers/llvmpipe/lp_scene.h
@@
-35,10
+35,11
@@
#ifndef LP_SCENE_H
#define LP_SCENE_H
#ifndef LP_SCENE_H
#define LP_SCENE_H
-#include "
pipe/p
_thread.h"
+#include "
os/os
_thread.h"
#include "lp_tile_soa.h"
#include "lp_rast.h"
#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.
/* We're limited to 2K by 2K for 32bit fixed point rasterization.
* Will need a 64-bit version for larger framebuffers.
@@
-56,8
+57,7
@@
/* switch to a non-pointer value for this:
*/
/* switch to a non-pointer value for this:
*/
-typedef void (*lp_rast_cmd)( struct lp_rasterizer *,
- unsigned thread_index,
+typedef void (*lp_rast_cmd)( struct lp_rasterizer_task *,
const union lp_rast_cmd_arg );
struct cmd_block {
const union lp_rast_cmd_arg );
struct cmd_block {
@@
-97,6
+97,13
@@
struct data_block_list {
};
};
+/** List of texture references */
+struct texture_ref {
+ struct pipe_texture *texture;
+ struct texture_ref *prev, *next; /**< linked list w/ u_simple_list.h */
+};
+
+
/**
* All bins and bin data are contained here.
* Per-bin data goes into the 'tile' bins.
/**
* All bins and bin data are contained here.
* Per-bin data goes into the 'tile' bins.
@@
-106,12
+113,19
@@
struct data_block_list {
* scenes:
*/
struct lp_scene {
* scenes:
*/
struct lp_scene {
- struct cmd_bin tile[TILES_X][TILES_Y];
- struct data_block_list data;
+ struct pipe_context *pipe;
+
+ /* 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;
/** the framebuffer to render the scene into */
struct pipe_framebuffer_state fb;
+ /** list of textures referenced by the scene commands */
+ struct texture_ref textures;
+
boolean write_depth;
/**
boolean write_depth;
/**
@@
-122,25
+136,28
@@
struct lp_scene {
int curr_x, curr_y; /**< for iterating over bins */
pipe_mutex mutex;
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_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 );
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 );
void lp_bin_new_data_block( struct data_block_list *list );
@@
-150,6
+167,12
@@
unsigned lp_scene_data_size( const struct lp_scene *scene );
unsigned lp_scene_bin_size( const struct lp_scene *scene, unsigned x, unsigned y );
unsigned lp_scene_bin_size( const struct lp_scene *scene, unsigned x, unsigned y );
+void lp_scene_texture_reference( struct lp_scene *scene,
+ struct pipe_texture *texture );
+
+boolean lp_scene_is_texture_referenced( const struct lp_scene *scene,
+ const struct pipe_texture *texture );
+
/**
* Allocate space for a command/data in the bin's data buffer.
/**
* Allocate space for a command/data in the bin's data buffer.
@@
-281,5
+304,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 );
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 */
#endif /* LP_BIN_H */