Module: Mesa
Branch: master
Commit: ac4054ca1766b5ab4ee2059e7e0f8590c219730d
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ac4054ca1766b5ab4ee2059e7e0f8590c219730d

Author: Eric Anholt <e...@anholt.net>
Date:   Wed Dec 20 17:19:23 2017 -0800

broadcom/vc5: Switch to setting the primitive list format in the RCL.

This means that we get a single copy of it emitted, instead of once at the
start of each tile (though it's still executed once per tile).  Fixes
assertion failures with the updated simulator.

---

 src/gallium/drivers/vc5/vc5_draw.c | 5 -----
 src/gallium/drivers/vc5/vc5_rcl.c  | 8 ++++++++
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/vc5/vc5_draw.c 
b/src/gallium/drivers/vc5/vc5_draw.c
index 6ca6966f71..e07fbd8e81 100644
--- a/src/gallium/drivers/vc5/vc5_draw.c
+++ b/src/gallium/drivers/vc5/vc5_draw.c
@@ -101,11 +101,6 @@ vc5_start_draw(struct vc5_context *vc5)
          */
         cl_emit(&job->bcl, START_TILE_BINNING, bin);
 
-        cl_emit(&job->bcl, PRIMITIVE_LIST_FORMAT, fmt) {
-                fmt.data_type = LIST_INDEXED;
-                fmt.primitive_type = LIST_TRIANGLES;
-        }
-
         job->needs_flush = true;
         job->draw_width = vc5->framebuffer.width;
         job->draw_height = vc5->framebuffer.height;
diff --git a/src/gallium/drivers/vc5/vc5_rcl.c 
b/src/gallium/drivers/vc5/vc5_rcl.c
index afb764c0a8..600a846966 100644
--- a/src/gallium/drivers/vc5/vc5_rcl.c
+++ b/src/gallium/drivers/vc5/vc5_rcl.c
@@ -152,6 +152,14 @@ vc5_rcl_emit_generic_per_tile_list(struct vc5_job *job, 
int last_cbuf)
          */
         cl_emit(cl, TILE_COORDINATES_IMPLICIT, coords);
 
+        /* The binner starts out writing tiles assuming that the initial mode
+         * is triangles, so make sure that's the case.
+         */
+        cl_emit(cl, PRIMITIVE_LIST_FORMAT, fmt) {
+                fmt.data_type = LIST_INDEXED;
+                fmt.primitive_type = LIST_TRIANGLES;
+        }
+
         cl_emit(cl, BRANCH_TO_IMPLICIT_TILE_LIST, branch);
 
         bool needs_color_clear = job->cleared & pipe_clear_color_buffers;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to