This commit is contained in:
Branimir Karadžić
2016-03-01 20:31:01 -08:00
parent 0e3436204c
commit e60d5532aa
5 changed files with 15 additions and 16 deletions

View File

@@ -1,18 +1,9 @@
#
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# Copyright 2011-2015 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
BGFX_DIR=../..
RUNTIME_DIR=$(BGFX_DIR)/examples/runtime
BUILD_DIR=../../.build
include $(BGFX_DIR)/scripts/shader.mk
include ../../../scripts/shader-embeded.mk
rebuild:
@make -s --no-print-directory TARGET=0 clean all
@make -s --no-print-directory TARGET=1 clean all
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all
@make -s --no-print-directory clean all

View File

@@ -712,7 +712,11 @@ namespace bgfx
uint32_t size = read(&reader, instruction);
BX_CHECK(size/4 == instruction.length, "read %d, expected %d", size/4, instruction.length); BX_UNUSED(size);
_fn(token * sizeof(uint32_t), instruction, _userData);
bool cont = _fn(token * sizeof(uint32_t), instruction, _userData);
if (!cont)
{
return;
}
token += instruction.length;
}

View File

@@ -247,7 +247,7 @@ namespace bgfx
int32_t read(bx::ReaderSeekerI* _reader, Dx9bc& _dx9bc);
int32_t write(bx::WriterSeekerI* _writer, const Dx9bc& _dx9bc);
typedef void (*Dx9bcParseFn)(uint32_t _offset, const Dx9bcInstruction& _instruction, void* _userData);
typedef bool (*Dx9bcParseFn)(uint32_t _offset, const Dx9bcInstruction& _instruction, void* _userData);
void parse(const Dx9bcShader& _src, Dx9bcParseFn _fn, void* _userData);
typedef void (*Dx9bcFilterFn)(Dx9bcInstruction& _instruction, void* _userData);

View File

@@ -723,7 +723,11 @@ namespace bgfx
);
BX_UNUSED(size);
_fn(token * sizeof(uint32_t), instruction, _userData);
bool cont = _fn(token * sizeof(uint32_t), instruction, _userData);
if (!cont)
{
return;
}
token += instruction.length;
}

View File

@@ -491,7 +491,7 @@ namespace bgfx
int32_t read(bx::ReaderSeekerI* _reader, SpirvShader& _shader);
int32_t write(bx::WriterI* _writer, const SpirvShader& _shader);
typedef void (*SpirvParseFn)(uint32_t _offset, const SpirvInstruction& _instruction, void* _userData);
typedef bool (*SpirvParseFn)(uint32_t _offset, const SpirvInstruction& _instruction, void* _userData);
void parse(const SpirvShader& _src, SpirvParseFn _fn, void* _userData);
typedef void (*SpirvFilterFn)(SpirvInstruction& _instruction, void* _userData);