Mesa (master): lima/streamparser: Add findings introduced with gl_PointSize

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 20 19:59:18 UTC 2019


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

Author: Andreas Baierl <ichgeh at imkreisrum.de>
Date:   Mon Nov 18 10:03:32 2019 +0100

lima/streamparser: Add findings introduced with gl_PointSize

Reviewed-by: Vasily Khoruzhick <anarsoul at gmail.com>
Signed-off-by: Andreas Baierl <ichgeh at imkreisrum.de>

---

 src/gallium/drivers/lima/lima_parser.c | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/lima/lima_parser.c b/src/gallium/drivers/lima/lima_parser.c
index 90d98210ad4..5d606bdc24a 100644
--- a/src/gallium/drivers/lima/lima_parser.c
+++ b/src/gallium/drivers/lima/lima_parser.c
@@ -24,6 +24,7 @@
 
 #include <stdio.h>
 #include <stdint.h>
+#include <string.h>
 
 #include "lima_parser.h"
 
@@ -236,11 +237,22 @@ parse_plbu_semaphore(FILE *fp, uint32_t *value1, uint32_t *value2)
 static void
 parse_plbu_primitive_setup(FILE *fp, uint32_t *value1, uint32_t *value2)
 {
+   char prim[10];
+
+   if ((*value1 & 0x0000f000) == 0x00000000)
+       strcpy(prim, "POINTS");
+   else if ((*value1 & 0x0000f000) == 0x00003000)
+       strcpy(prim, "LINES");
+   else if ((*value1 & 0x0000f000) == 0x00002000)
+       strcpy(prim, "TRIANGLES");
+   else
+       strcpy(prim, "UNKNOWN");
+
    if (*value1 == 0x00000200)
       fprintf(fp, "\t/* UNKNOWN_2 (PRIMITIVE_SETUP INIT?) */\n");
    else
-      fprintf(fp, "\t/* PRIMITIVE_SETUP: low_prim: %s, cull: %d (0x%x), index_size: %d (0x%08x) */\n",
-              (*value1 & 0x0000f000) == 0x00003000 ? "true" : "false",
+      fprintf(fp, "\t/* PRIMITIVE_SETUP: prim: %s, cull: %d (0x%x), index_size: %d (0x%08x) */\n",
+              prim,
               (*value1 & 0x000f0000) >> 16, (*value1 & 0x000f0000) >> 16,
               (*value1 & 0x00001e00) >> 9, (*value1 & 0x00001e00) >> 9);
 }
@@ -299,6 +311,12 @@ parse_plbu_indexed_dest(FILE *fp, uint32_t *value1, uint32_t *value2)
 }
 
 static void
+parse_plbu_indexed_pt_size(FILE *fp, uint32_t *value1, uint32_t *value2)
+{
+   fprintf(fp, "\t/* INDEXED_PT_SIZE: pt_size: 0x%08x */\n", *value1);
+}
+
+static void
 parse_plbu_indices(FILE *fp, uint32_t *value1, uint32_t *value2)
 {
    fprintf(fp, "\t/* INDICES: indices: 0x%x */\n", *value1);
@@ -364,6 +382,8 @@ lima_parse_plbu(FILE *fp, uint32_t *data, int size, uint32_t start)
          parse_plbu_indexed_dest(fp, value1, value2);
       else if ((*value2 & 0xff000fff) == 0x10000101)
          parse_plbu_indices(fp, value1, value2);
+      else if ((*value2 & 0xff000fff) == 0x10000102)
+         parse_plbu_indexed_pt_size(fp, value1, value2);
       else if ((*value2 & 0xff000fff) == 0x10000105)
          parse_plbu_viewport_bottom(fp, (float *)value1, value2);
       else if ((*value2 & 0xff000fff) == 0x10000106)




More information about the mesa-commit mailing list