intel/fs: add hint how to get more info when shader validation fails
authorMarcin Ślusarz <marcin.slusarz@intel.com>
Wed, 2 Sep 2020 12:26:41 +0000 (14:26 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 4 Sep 2020 12:09:22 +0000 (12:09 +0000)
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6559>

src/intel/compiler/brw_fs_generator.cpp

index e75c8d98337b7f4194142527228c8c2a68ca749e..8328ae6c9f70ef89089a8dbd6533d93550f78bbc 100644 (file)
@@ -2572,6 +2572,12 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width,
       }
    }
    ralloc_free(disasm_info);
+#ifndef NDEBUG
+   if (!validated && !debug_flag) {
+      fprintf(stderr,
+            "Validation failed. Rerun with INTEL_DEBUG=shaders to get more information.\n");
+   }
+#endif
    assert(validated);
 
    compiler->shader_debug_log(log_data,