diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | misc/glsl_scraper.py | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/Makefile.am b/Makefile.am index 8c99e6f..b1dac91 100644 --- a/Makefile.am +++ b/Makefile.am @@ -118,7 +118,7 @@ BUILT_SOURCES = \ bin_crucible_LDADD = $(MESA_LDFLAGS) -lm -lvulkan -lpthread -lpng16 %-spirv.h: %.c misc/glsl_scraper.py - $(AM_V_GEN) $(PYTHON2) $(srcdir)/misc/glsl_scraper.py --with-glslang=$(GLSLANG) -o $@ $< + $(AM_V_GEN) $(PYTHON3) $(srcdir)/misc/glsl_scraper.py --with-glslang=$(GLSLANG) -o $@ $< %_gen.c: %_gen.py $(AM_V_GEN) $(PYTHON3) $< diff --git a/misc/glsl_scraper.py b/misc/glsl_scraper.py index ece63dc..4e032cd 100644 --- a/misc/glsl_scraper.py +++ b/misc/glsl_scraper.py @@ -1,7 +1,7 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 import argparse -import cStringIO +import io import os import re import shutil @@ -13,7 +13,7 @@ from textwrap import dedent class Shader: def __init__(self, stage): - self.stream = cStringIO.StringIO() + self.stream = io.StringIO() self.stage = stage if self.stage == 'VERTEX': @@ -190,18 +190,18 @@ class Parser: self.current_shader.add_text(t) def handle_macro(self, macro): - t = self.token_iter.next() + t = next(self.token_iter) assert t == '(' if macro == 'qoCreateShaderGLSL': # Throw away the device parameter - t = self.token_iter.next() - t = self.token_iter.next() + t = next(self.token_iter) + t = next(self.token_iter) assert t == ',' - stage = self.token_iter.next().strip() + stage = next(self.token_iter).strip() - t = self.token_iter.next() + t = next(self.token_iter) assert t == ',' self.current_shader = Shader(stage) |