Mesa (master): intel/fs: add hint how to get more info when shader validation fails

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Sep 4 12:14:42 UTC 2020


Module: Mesa
Branch: master
Commit: 663c4d53771a1b00ed49acb08768fd0c01cb9b8e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=663c4d53771a1b00ed49acb08768fd0c01cb9b8e

Author: Marcin Ślusarz <marcin.slusarz at intel.com>
Date:   Wed Sep  2 14:26:41 2020 +0200

intel/fs: add hint how to get more info when shader validation fails

Signed-off-by: Marcin Ślusarz <marcin.slusarz at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6559>

---

 src/intel/compiler/brw_fs_generator.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/intel/compiler/brw_fs_generator.cpp b/src/intel/compiler/brw_fs_generator.cpp
index e75c8d98337..8328ae6c9f7 100644
--- a/src/intel/compiler/brw_fs_generator.cpp
+++ b/src/intel/compiler/brw_fs_generator.cpp
@@ -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,



More information about the mesa-commit mailing list