i965: Use the object label when available for INTEL_DEBUG=vs,gs,fs output.
authorEric Anholt <eric@anholt.net>
Thu, 20 Feb 2014 21:31:40 +0000 (13:31 -0800)
committerEric Anholt <eric@anholt.net>
Sun, 23 Feb 2014 03:23:20 +0000 (19:23 -0800)
Note that this requires updated run.py in shader_db.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_generator.cpp
src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp

index 3f2060d86bb87454bc8f887af909c6beb813d2a1..104c0693b81d885c80419af1e27005aefc93e5c8 100644 (file)
@@ -1326,7 +1326,8 @@ fs_generator::generate_code(exec_list *instructions, FILE *dump_file)
 
    if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
       if (prog) {
-         printf("Native code for fragment shader %d (SIMD%d dispatch):\n",
+         printf("Native code for %s fragment shader %d (SIMD%d dispatch):\n",
+                prog->Label ? prog->Label : "unnamed",
                 prog->Name, dispatch_width);
       } else if (fp) {
          printf("Native code for fragment program %d (SIMD%d dispatch):\n",
index d3d593941b2f87b418feb06b2923d840d7284df6..23c0542045b382e526a9ef58d53e7b7b7ff8e5c8 100644 (file)
@@ -1271,7 +1271,9 @@ vec4_generator::generate_code(exec_list *instructions)
 
    if (unlikely(debug_flag)) {
       if (shader_prog) {
-         printf("Native code for vertex shader %d:\n", shader_prog->Name);
+         printf("Native code for %s vertex shader %d:\n",
+                shader_prog->Label ? shader_prog->Label : "unnamed",
+                shader_prog->Name);
       } else {
          printf("Native code for vertex program %d:\n", prog->Id);
       }
index 86e772c29e2f7ab89a0a08e37676b03bcf864e4e..96e532edf426b3051245a821dfd4bbb3819cb029 100644 (file)
@@ -838,7 +838,8 @@ gen8_fs_generator::generate_code(exec_list *instructions)
 
    if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
       if (prog) {
-         printf("Native code for fragment shader %d (SIMD%d dispatch):\n",
+         printf("Native code for %s fragment shader %d (SIMD%d dispatch):\n",
+                shader_prog->Label ? shader_prog->Label : "unnamed",
                 shader_prog->Name, dispatch_width);
       } else if (fp) {
          printf("Native code for fragment program %d (SIMD%d dispatch):\n",
index 7f6b2094e79b4488a13722eca1c9315c21380e91..45393b536d7a0fab8806f10e2194342a0ba9206e 100644 (file)
@@ -801,7 +801,9 @@ gen8_vec4_generator::generate_code(exec_list *instructions)
 
    if (unlikely(debug_flag)) {
       if (shader_prog) {
-         printf("Native code for vertex shader %d:\n", shader_prog->Name);
+         printf("Native code for %s vertex shader %d:\n",
+                shader_prog->Label ? shader_prog->Label : "unnamed",
+                shader_prog->Name);
       } else {
          printf("Native code for vertex program %d:\n", prog->Id);
       }