lima: print gp uniforms if gp debug is enabled
authorVasily Khoruzhick <anarsoul@gmail.com>
Sun, 8 Mar 2020 18:05:12 +0000 (11:05 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 11 Mar 2020 07:36:44 +0000 (07:36 +0000)
Since we keep other constants there as well it's useful for reading disassembly.

Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4110>

src/gallium/drivers/lima/lima_draw.c

index 637d5ec59d06a84034ebb224b91897b52d2d1973..47f6d2bfbf590704d52f439df5d2cb3e3d5c7c02 100644 (file)
@@ -825,6 +825,19 @@ lima_update_gp_uniform(struct lima_context *ctx)
 
    struct lima_job *job = lima_job_get(ctx);
 
+   if (lima_debug & LIMA_DEBUG_GP) {
+      float *vs_const_buff_f = vs_const_buff;
+      printf("gp uniforms:\n");
+      for (int i = 0; i < (size / sizeof(float)); i++) {
+         if ((i % 4) == 0)
+            printf("%4d:", i / 4);
+         printf(" %8.4f", vs_const_buff_f[i]);
+         if ((i % 4) == 3)
+            printf("\n");
+      }
+      printf("\n");
+   }
+
    lima_dump_command_stream_print(
       job->dump, vs_const_buff, size, true,
       "update gp uniform at va %x\n",