This commit is contained in:
Branimir Karadžić 2016-03-07 15:39:11 -08:00
Родитель 5c0874f82f
Коммит 96c8ac71ff
2 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -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)

Просмотреть файл

@ -781,7 +781,7 @@ namespace bgfx
size += read(_reader, _instruction.result, _err);
}
uint32_t currOp = 0;
uint16_t currOp = 0;
switch (_instruction.opcode)
{
case SpvOpcode::EntryPoint: