Mesa (master): broadcom/vc5: Don't skip job submit just because everything is scissored.
Eric Anholt
anholt at kemper.freedesktop.org
Wed Mar 21 17:04:24 UTC 2018
Module: Mesa
Branch: master
Commit: 9f0c9c6d18dfb0027bde20647083395e24ce9825
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9f0c9c6d18dfb0027bde20647083395e24ce9825
Author: Eric Anholt <eric at anholt.net>
Date: Tue Mar 20 12:52:19 2018 -0700
broadcom/vc5: Don't skip job submit just because everything is scissored.
The coordinate shaders may now have side effects in the form of transform
feedback.
Part of fixing
GTF-GLES3.gtf.GL3Tests.transform_feedback.transform_feedback_misc
---
src/gallium/drivers/vc5/vc5_job.c | 8 --------
src/gallium/drivers/vc5/vc5_rcl.c | 9 +++++++--
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/src/gallium/drivers/vc5/vc5_job.c b/src/gallium/drivers/vc5/vc5_job.c
index aa56ad6f24..213a978e3c 100644
--- a/src/gallium/drivers/vc5/vc5_job.c
+++ b/src/gallium/drivers/vc5/vc5_job.c
@@ -377,14 +377,6 @@ vc5_job_submit(struct vc5_context *vc5, struct vc5_job *job)
if (!job->needs_flush)
goto done;
- /* The RCL setup would choke if the draw bounds cause no drawing, so
- * just drop the drawing if that's the case.
- */
- if (job->draw_max_x <= job->draw_min_x ||
- job->draw_max_y <= job->draw_min_y) {
- goto done;
- }
-
if (vc5->screen->devinfo.ver >= 41)
v3d41_emit_rcl(job);
else
diff --git a/src/gallium/drivers/vc5/vc5_rcl.c b/src/gallium/drivers/vc5/vc5_rcl.c
index 86ea22628d..a5efa32e21 100644
--- a/src/gallium/drivers/vc5/vc5_rcl.c
+++ b/src/gallium/drivers/vc5/vc5_rcl.c
@@ -696,8 +696,13 @@ v3dX(emit_rcl)(struct vc5_job *job)
uint32_t supertile_h_in_pixels = job->tile_height * supertile_h;
uint32_t min_x_supertile = job->draw_min_x / supertile_w_in_pixels;
uint32_t min_y_supertile = job->draw_min_y / supertile_h_in_pixels;
- uint32_t max_x_supertile = (job->draw_max_x - 1) / supertile_w_in_pixels;
- uint32_t max_y_supertile = (job->draw_max_y - 1) / supertile_h_in_pixels;
+
+ uint32_t max_x_supertile = 0;
+ uint32_t max_y_supertile = 0;
+ if (job->draw_max_x != 0 && job->draw_max_y != 0) {
+ max_x_supertile = (job->draw_max_x - 1) / supertile_w_in_pixels;
+ max_y_supertile = (job->draw_max_y - 1) / supertile_h_in_pixels;
+ }
for (int y = min_y_supertile; y <= max_y_supertile; y++) {
for (int x = min_x_supertile; x <= max_x_supertile; x++) {
More information about the mesa-commit
mailing list