[build] Keep error messages from glslangValidator

The tool is horrible as a built tool due to it not being silent when all
is good (it outputs the input file name) and sends its error messages to
stdout instead of stderr. Then filtering causes the error code to be
lost. This uses a solution found on stack-exchange.
This commit is contained in:
Bill Currie 2021-01-09 11:36:19 +09:00
parent 5aa74df922
commit 06d45cff0d

View file

@ -119,11 +119,11 @@ V_XXD_1 =
%.spv: %
@$(mkdir_p) $(builddir)/`dirname $@`
$(V_GLSLANG)$(GLSLANGVALIDATOR) -V $< -o $@ > /dev/null
$(V_GLSLANG)(((($(GLSLANGVALIDATOR) -V $< -o $@; echo $$? >&3) | sed -e '1d' 1>&2) 3>&1) | (read xs; exit $$xs))
%.spvc: %
@$(mkdir_p) $(builddir)/`dirname $@`
$(V_GLSLANG)$(GLSLANGVALIDATOR) --vn `basename $< | tr . _` -V $< -o $@ > /dev/null
$(V_GLSLANG)(((($(GLSLANGVALIDATOR) --vn `basename $< | tr . _` -V $< -o $@; echo $$? >&3) | sed -e '1d' 1>&2) 3>&1) | (read xs; exit $$xs))
shaderdir = @shaderdir@
shader_DATA =