[Mesa-dev] [PATCH 3/8] i965: Use the object label when available for INTEL_DEBUG=vs, gs, fs output.
Eric Anholt
eric at anholt.net
Fri Feb 21 11:32:29 PST 2014
Note that this requires updated run.py in shader_db.
---
src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 3 ++-
src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 4 +++-
src/mesa/drivers/dri/i965/gen8_fs_generator.cpp | 3 ++-
src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp | 4 +++-
4 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index 3f2060d..104c069 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -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",
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
index d3d5939..23c0542 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
@@ -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);
}
diff --git a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
index 86e772c..96e532e 100644
--- a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
@@ -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",
diff --git a/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp b/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp
index 7f6b209..45393b5 100644
--- a/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp
+++ b/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp
@@ -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);
}
--
1.9.rc1
More information about the mesa-dev
mailing list