summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/lima
diff options
context:
space:
mode:
authorQiang Yu <[email protected]>2020-02-05 20:05:03 +0800
committerMarge Bot <[email protected]>2020-02-17 02:54:15 +0000
commited117ee630f449fe6d2ed9e205a6dc80bed6dfa2 (patch)
tree4ef57469463841f97bcf7d3a9b22023bb2563b50 /src/gallium/drivers/lima
parent4b93792274f363983949502315ca693a83fdfb56 (diff)
lima: move clear into submit (v2)
clear info is needed when submit flush and may be changed after framebuffer switch, so we need to move it into submit. This also fixes 5 dEQP tests as a side effect: clear info is per submit so clear value when one submit won't affect next submit. v2: remove fixed dEQP test from CI list. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
Diffstat (limited to 'src/gallium/drivers/lima')
-rw-r--r--src/gallium/drivers/lima/lima_context.h9
-rw-r--r--src/gallium/drivers/lima/lima_draw.c2
-rw-r--r--src/gallium/drivers/lima/lima_submit.c12
-rw-r--r--src/gallium/drivers/lima/lima_submit.h10
4 files changed, 17 insertions, 16 deletions
diff --git a/src/gallium/drivers/lima/lima_context.h b/src/gallium/drivers/lima/lima_context.h
index fa10b041df2..53a0086fff1 100644
--- a/src/gallium/drivers/lima/lima_context.h
+++ b/src/gallium/drivers/lima/lima_context.h
@@ -38,14 +38,6 @@ struct lima_context_framebuffer {
int shift_min;
};
-struct lima_context_clear {
- unsigned buffers;
- uint32_t color_8pc;
- uint32_t depth;
- uint32_t stencil;
- uint64_t color_16pc;
-};
-
struct lima_depth_stencil_alpha_state {
struct pipe_depth_stencil_alpha_state base;
};
@@ -193,7 +185,6 @@ struct lima_context {
struct lima_context_framebuffer framebuffer;
struct lima_context_viewport_state viewport;
struct pipe_scissor_state scissor;
- struct lima_context_clear clear;
struct lima_vs_shader_state *vs;
struct lima_fs_shader_state *fs;
struct lima_vertex_element_state *vertex_elements;
diff --git a/src/gallium/drivers/lima/lima_draw.c b/src/gallium/drivers/lima/lima_draw.c
index 6e6d539e867..27728fe00a8 100644
--- a/src/gallium/drivers/lima/lima_draw.c
+++ b/src/gallium/drivers/lima/lima_draw.c
@@ -114,7 +114,7 @@ lima_clear(struct pipe_context *pctx, unsigned buffers,
}
struct lima_submit *submit = lima_submit_get(ctx);
- struct lima_context_clear *clear = &ctx->clear;
+ struct lima_submit_clear *clear = &submit->clear;
clear->buffers = buffers;
if (buffers & PIPE_CLEAR_COLOR0) {
diff --git a/src/gallium/drivers/lima/lima_submit.c b/src/gallium/drivers/lima/lima_submit.c
index e1c96437006..8b875566060 100644
--- a/src/gallium/drivers/lima/lima_submit.c
+++ b/src/gallium/drivers/lima/lima_submit.c
@@ -740,12 +740,12 @@ lima_pack_pp_frame_reg(struct lima_submit *submit, uint32_t *frame_reg,
frame->render_address = screen->pp_buffer->va + pp_frame_rsw_offset;
frame->flags = 0x02;
- frame->clear_value_depth = ctx->clear.depth;
- frame->clear_value_stencil = ctx->clear.stencil;
- frame->clear_value_color = ctx->clear.color_8pc;
- frame->clear_value_color_1 = ctx->clear.color_8pc;
- frame->clear_value_color_2 = ctx->clear.color_8pc;
- frame->clear_value_color_3 = ctx->clear.color_8pc;
+ frame->clear_value_depth = submit->clear.depth;
+ frame->clear_value_stencil = submit->clear.stencil;
+ frame->clear_value_color = submit->clear.color_8pc;
+ frame->clear_value_color_1 = submit->clear.color_8pc;
+ frame->clear_value_color_2 = submit->clear.color_8pc;
+ frame->clear_value_color_3 = submit->clear.color_8pc;
frame->one = 1;
frame->width = fb->base.width - 1;
diff --git a/src/gallium/drivers/lima/lima_submit.h b/src/gallium/drivers/lima/lima_submit.h
index 32b9637b3de..31d961a6d13 100644
--- a/src/gallium/drivers/lima/lima_submit.h
+++ b/src/gallium/drivers/lima/lima_submit.h
@@ -40,6 +40,14 @@ struct lima_submit_key {
struct pipe_surface *zsbuf;
};
+struct lima_submit_clear {
+ unsigned buffers;
+ uint32_t color_8pc;
+ uint32_t depth;
+ uint32_t stencil;
+ uint64_t color_16pc;
+};
+
struct lima_submit {
int fd;
struct lima_context *ctx;
@@ -58,6 +66,8 @@ struct lima_submit {
int pp_max_stack_size;
struct pipe_scissor_state damage_rect;
+
+ struct lima_submit_clear clear;
};
struct lima_submit *lima_submit_get(struct lima_context *ctx);