summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_context.h
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2013-12-20 20:48:18 -0500
committerRob Clark <[email protected]>2013-12-26 12:06:29 -0500
commitbe01d7a905d827c3c0c222cab2430c6d4575429a (patch)
treefc714be776c88076f061280b60137c1322af103b /src/gallium/drivers/freedreno/freedreno_context.h
parent64fe0670664bc6f2c75cc1630aa07cef1898b8b5 (diff)
freedreno: prepare for hw binning
Actually assign VSC_PIPE's properly, which will be needed for tiling. And introduce fd_tile for per-tile state (including the assignment of tile to VSC_PIPE). This gives us the proper pipe setup that we'll need for hw binning pass, and also cleans things up a bit by not having to pass so many parameters around. And will also make it easier to introduce different tiling patterns (since we may no longer render tiles in a simple left-to-right top-to-bottom pattern). Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_context.h')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_context.h24
1 files changed, 7 insertions, 17 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h
index d3a01fcb84b..db37f9cb8a3 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.h
+++ b/src/gallium/drivers/freedreno/freedreno_context.h
@@ -37,6 +37,7 @@
#include "util/u_string.h"
#include "freedreno_screen.h"
+#include "freedreno_gmem.h"
struct fd_vertex_stateobj;
@@ -80,15 +81,6 @@ struct fd_vertex_stateobj {
unsigned num_elements;
};
-struct fd_gmem_stateobj {
- struct pipe_scissor_state scissor;
- uint cpp;
- uint16_t minx, miny;
- uint16_t bin_h, nbins_y;
- uint16_t bin_w, nbins_x;
- uint16_t width, height;
-};
-
struct fd_context {
struct pipe_context base;
@@ -176,6 +168,8 @@ struct fd_context {
* if out of date with current maximal-scissor/cpp:
*/
struct fd_gmem_stateobj gmem;
+ struct fd_vsc_pipe pipe[8];
+ struct fd_tile tile[64];
/* which state objects need to be re-emit'd: */
enum {
@@ -221,14 +215,10 @@ struct fd_context {
/* GMEM/tile handling fxns: */
void (*emit_tile_init)(struct fd_context *ctx);
- void (*emit_tile_prep)(struct fd_context *ctx, uint32_t xoff, uint32_t yoff,
- uint32_t bin_w, uint32_t bin_h);
- void (*emit_tile_mem2gmem)(struct fd_context *ctx, uint32_t xoff, uint32_t yoff,
- uint32_t bin_w, uint32_t bin_h);
- void (*emit_tile_renderprep)(struct fd_context *ctx, uint32_t xoff, uint32_t yoff,
- uint32_t bin_w, uint32_t bin_h);
- void (*emit_tile_gmem2mem)(struct fd_context *ctx, uint32_t xoff, uint32_t yoff,
- uint32_t bin_w, uint32_t bin_h);
+ void (*emit_tile_prep)(struct fd_context *ctx, struct fd_tile *tile);
+ void (*emit_tile_mem2gmem)(struct fd_context *ctx, struct fd_tile *tile);
+ void (*emit_tile_renderprep)(struct fd_context *ctx, struct fd_tile *tile);
+ void (*emit_tile_gmem2mem)(struct fd_context *ctx, struct fd_tile *tile);
/* optional, for GMEM bypass: */
void (*emit_sysmem_prep)(struct fd_context *ctx);