Mesa (master): vc4: Move job-submit skip cases to vc4_job_submit().
Eric Anholt
anholt at kemper.freedesktop.org
Wed Sep 14 05:26:02 UTC 2016
Module: Mesa
Branch: master
Commit: 774a556b6dc0d49f9f29c438349a66e69062e6e4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=774a556b6dc0d49f9f29c438349a66e69062e6e4
Author: Eric Anholt <eric at anholt.net>
Date: Thu Sep 8 14:03:29 2016 -0700
vc4: Move job-submit skip cases to vc4_job_submit().
For calling job_submit() directly, I need the skipping here.
---
src/gallium/drivers/vc4/vc4_context.c | 12 ------------
src/gallium/drivers/vc4/vc4_job.c | 12 ++++++++++++
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/gallium/drivers/vc4/vc4_context.c b/src/gallium/drivers/vc4/vc4_context.c
index 8b174f3..e7f63d6 100644
--- a/src/gallium/drivers/vc4/vc4_context.c
+++ b/src/gallium/drivers/vc4/vc4_context.c
@@ -44,18 +44,6 @@ vc4_flush(struct pipe_context *pctx)
struct pipe_surface *cbuf = vc4->framebuffer.cbufs[0];
struct pipe_surface *zsbuf = vc4->framebuffer.zsbuf;
- if (!vc4->needs_flush)
- return;
-
- /* The RCL setup would choke if the draw bounds cause no drawing, so
- * just drop the drawing if that's the case.
- */
- if (vc4->draw_max_x <= vc4->draw_min_x ||
- vc4->draw_max_y <= vc4->draw_min_y) {
- vc4_job_reset(vc4);
- return;
- }
-
if (cbuf && (vc4->resolve & PIPE_CLEAR_COLOR0)) {
pipe_surface_reference(&vc4->color_write,
cbuf->texture->nr_samples > 1 ?
diff --git a/src/gallium/drivers/vc4/vc4_job.c b/src/gallium/drivers/vc4/vc4_job.c
index d8c1115..e71f6f4 100644
--- a/src/gallium/drivers/vc4/vc4_job.c
+++ b/src/gallium/drivers/vc4/vc4_job.c
@@ -170,6 +170,18 @@ vc4_submit_setup_rcl_msaa_surface(struct vc4_context *vc4,
void
vc4_job_submit(struct vc4_context *vc4)
{
+ if (!vc4->needs_flush)
+ return;
+
+ /* The RCL setup would choke if the draw bounds cause no drawing, so
+ * just drop the drawing if that's the case.
+ */
+ if (vc4->draw_max_x <= vc4->draw_min_x ||
+ vc4->draw_max_y <= vc4->draw_min_y) {
+ vc4_job_reset(vc4);
+ return;
+ }
+
if (vc4_debug & VC4_DEBUG_CL) {
fprintf(stderr, "BCL:\n");
vc4_dump_cl(vc4->bcl.base, cl_offset(&vc4->bcl), false);
More information about the mesa-commit
mailing list