[Mesa-dev] [PATCH] mesa: Make MESA_SHADER_CAPTURE_PATH skip shaders with Name == -1.

Kenneth Graunke kenneth at whitecape.org
Tue Jul 26 17:03:32 UTC 2016


Shaders with shProg->Name == ~0 (aka 4294967295) are internal meta
shaders that we don't really want to capture.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/main/shaderapi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index c5c5024..41c3202 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -1094,7 +1094,7 @@ _mesa_link_program(struct gl_context *ctx, struct gl_shader_program *shProg)
 
    /* Capture .shader_test files. */
    const char *capture_path = _mesa_get_shader_capture_path();
-   if (shProg->Name != 0 && capture_path != NULL) {
+   if (shProg->Name != 0 && shProg->Name != ~0 && capture_path != NULL) {
       FILE *file;
       char filename[PATH_MAX];
 
-- 
2.9.0



More information about the mesa-dev mailing list