diff options
author | Boris Brezillon <[email protected]> | 2019-09-01 10:24:30 +0200 |
---|---|---|
committer | Boris Brezillon <[email protected]> | 2019-09-13 16:25:06 +0200 |
commit | 1b5873b73cdfe288a9defdcc1455c2809f3437fc (patch) | |
tree | 3bb058f36c539cd41504d5f93e2251ac907ad30e /src/gallium/drivers/panfrost/pan_job.h | |
parent | 92765f85e1bb677b9d61b4f4a3f87c6b64649e12 (diff) |
panfrost: Use a pipe_framebuffer_state as the batch key
This way we have all the fb_state information directly attached to a
batch and can pass only the batch to functions emitting CMDs, which is
needed if we want to be able to queue CMDs to a batch that's not
currently bound to the context.
Signed-off-by: Boris Brezillon <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_job.h')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_job.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/gallium/drivers/panfrost/pan_job.h b/src/gallium/drivers/panfrost/pan_job.h index c9f48787121..7854e0a0f99 100644 --- a/src/gallium/drivers/panfrost/pan_job.h +++ b/src/gallium/drivers/panfrost/pan_job.h @@ -31,13 +31,6 @@ #include "pan_allocate.h" #include "pan_resource.h" -/* Used as a hash table key */ - -struct panfrost_batch_key { - struct pipe_surface *cbufs[4]; - struct pipe_surface *zsbuf; -}; - #define PAN_REQ_MSAA (1 << 0) #define PAN_REQ_DEPTH_WRITE (1 << 1) @@ -46,7 +39,7 @@ struct panfrost_batch_key { struct panfrost_batch { struct panfrost_context *ctx; - struct panfrost_batch_key key; + struct pipe_framebuffer_state key; /* Buffers cleared (PIPE_CLEAR_* bitmask) */ unsigned clear; @@ -120,15 +113,15 @@ struct panfrost_batch { /* Functions for managing the above */ struct panfrost_batch * -panfrost_create_batch(struct panfrost_context *ctx); +panfrost_create_batch(struct panfrost_context *ctx, + const struct pipe_framebuffer_state *key); void panfrost_free_batch(struct panfrost_batch *batch); struct panfrost_batch * panfrost_get_batch(struct panfrost_context *ctx, - struct pipe_surface **cbufs, - struct pipe_surface *zsbuf); + const struct pipe_framebuffer_state *key); struct panfrost_batch * panfrost_get_batch_for_fbo(struct panfrost_context *ctx); |