From 6412c5e0763dc079312cd5c81cb077d0c393b2b4 Mon Sep 17 00:00:00 2001 From: Branimir Karadžić Date: Tue, 8 Mar 2016 11:44:52 +0100 Subject: Update BGFX and BX (nw) --- 3rdparty/bgfx/scripts/shader-embeded.mk | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to '3rdparty/bgfx/scripts/shader-embeded.mk') diff --git a/3rdparty/bgfx/scripts/shader-embeded.mk b/3rdparty/bgfx/scripts/shader-embeded.mk index 59bb3d9d037..d6ccecf61dd 100644 --- a/3rdparty/bgfx/scripts/shader-embeded.mk +++ b/3rdparty/bgfx/scripts/shader-embeded.mk @@ -1,5 +1,5 @@ # -# Copyright 2011-2015 Branimir Karadzic. All rights reserved. +# Copyright 2011-2016 Branimir Karadzic. All rights reserved. # License: http://www.opensource.org/licenses/BSD-2-Clause # @@ -8,14 +8,17 @@ include $(THISDIR)/tools.mk VS_FLAGS+=-i $(THISDIR)../src/ --type vertex FS_FLAGS+=-i $(THISDIR)../src/ --type fragment +CS_FLAGS+=-i $(THISDIR)../src/ --type compute VS_SOURCES=$(wildcard vs_*.sc) FS_SOURCES=$(wildcard fs_*.sc) +CS_SOURCES=$(wildcard cs_*.sc) VS_BIN = $(addsuffix .bin.h, $(basename $(VS_SOURCES))) FS_BIN = $(addsuffix .bin.h, $(basename $(FS_SOURCES))) +CS_BIN = $(addsuffix .bin.h, $(basename $(CS_SOURCES))) -BIN = $(VS_BIN) $(FS_BIN) +BIN = $(VS_BIN) $(FS_BIN) $(CS_BIN) SHADER_TMP = $(TEMP)/tmp @@ -41,6 +44,13 @@ fs_%.bin.h : fs_%.sc -$(SILENT) $(SHADERC) $(FS_FLAGS) --platform ios -p metal -O 3 -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_mtl -@cat $(SHADER_TMP) >> $(@) +cs_%.bin.h : cs_%.sc + @echo [$(<)] + $(SILENT) $(SHADERC) $(CS_FLAGS) --platform linux -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_glsl + @cat $(SHADER_TMP) > $(@) + -$(SILENT) $(SHADERC) $(CS_FLAGS) --platform windows -p cs_5_0 -O 1 -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_dx11 + -@cat $(SHADER_TMP) >> $(@) + .PHONY: all all: $(BIN) -- cgit v1.2.3-70-g09d2