From 7af89d178736637cfad9c195f85f7f83e2f4ba99 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Mon, 10 Jul 2017 09:04:50 -0700 Subject: Cleanups for test cases: - Allow a code-generation target of `NONE` in order to suppress ordinary output in test cases where we don't care about the actual output (just pass/fail result) - Add explicit `location` layout qualifiers to intermediate vertex-to-fragment variables in GLSL test cases for rendering, to work around apparent Intel driver bugs. --- source/slang/emit.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/slang/emit.cpp') diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 01b3e8cc2..155e1e39a 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -2159,6 +2159,11 @@ struct EmitVisitor void EmitStmt(RefPtr stmt) { + // TODO(tfoley): this shouldn't occur, but sometimes + // lowering will get confused by an empty function body... + if (!stmt) + return; + // Try to ensure that debugging can find the right location advanceToSourceLocation(stmt->Position); -- cgit v1.2.3