From e5b8b6790537c04d0714e59b6cbc4ac7d0db28e2 Mon Sep 17 00:00:00 2001 From: Felix Palmer Date: Tue, 24 May 2016 10:10:02 +0200 Subject: [PATCH] Discard initial outpu from cgc --- glsl-validate.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/glsl-validate.py b/glsl-validate.py index 12ba749..13424c5 100755 --- a/glsl-validate.py +++ b/glsl-validate.py @@ -97,6 +97,11 @@ def shader_info(shader_file): if ret_code == 0: lines = p.stdout.readlines() + # Discard output at top, not useful + while len(lines) > 0: + if "#program main" in lines.pop(0): + break + assembly = "".join(lines[:-1]) if args.assembly: print assembly