mirror of https://github.com/bkaradzic/bgfx
Cleanup.
This commit is contained in:
parent
0c633a61a4
commit
23d592a862
|
@ -25,6 +25,8 @@ all:
|
|||
@echo " TARGET=7 (spriv)"
|
||||
else
|
||||
|
||||
ADDITIONAL_INCLUDES?=
|
||||
|
||||
ifeq ($(TARGET), 0)
|
||||
VS_FLAGS=--platform windows -p vs_3_0 -O 3
|
||||
FS_FLAGS=--platform windows -p ps_3_0 -O 3
|
||||
|
@ -80,9 +82,9 @@ endif
|
|||
endif
|
||||
|
||||
THISDIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
||||
VS_FLAGS+=-i $(THISDIR)../src/
|
||||
FS_FLAGS+=-i $(THISDIR)../src/
|
||||
CS_FLAGS+=-i $(THISDIR)../src/
|
||||
VS_FLAGS+=-i $(THISDIR)../src/ $(ADDITIONAL_INCLUDES)
|
||||
FS_FLAGS+=-i $(THISDIR)../src/ $(ADDITIONAL_INCLUDES)
|
||||
CS_FLAGS+=-i $(THISDIR)../src/ $(ADDITIONAL_INCLUDES)
|
||||
|
||||
BUILD_OUTPUT_DIR=$(addprefix ./, $(RUNTIME_DIR)/$(SHADER_PATH))
|
||||
BUILD_INTERMEDIATE_DIR=$(addprefix $(BUILD_DIR)/, $(SHADER_PATH))
|
||||
|
|
|
@ -3006,7 +3006,7 @@ namespace bgfx
|
|||
if (!isValid(_vsh)
|
||||
|| !isValid(_fsh) )
|
||||
{
|
||||
BX_WARN(false, "Vertex/fragment shader is invalid (vsh %d, fsh %d).", _vsh.idx, _fsh.idx);
|
||||
BX_TRACE("Vertex/fragment shader is invalid (vsh %d, fsh %d).", _vsh.idx, _fsh.idx);
|
||||
ProgramHandle invalid = BGFX_INVALID_HANDLE;
|
||||
return invalid;
|
||||
}
|
||||
|
@ -3024,7 +3024,7 @@ namespace bgfx
|
|||
const ShaderRef& fsr = m_shaderRef[_fsh.idx];
|
||||
if (vsr.m_hash != fsr.m_hash)
|
||||
{
|
||||
BX_WARN(vsr.m_hash == fsr.m_hash, "Vertex shader output doesn't match fragment shader input.");
|
||||
BX_TRACE("Vertex shader output doesn't match fragment shader input.");
|
||||
ProgramHandle invalid = BGFX_INVALID_HANDLE;
|
||||
return invalid;
|
||||
}
|
||||
|
|
|
@ -422,7 +422,7 @@ namespace bgfx
|
|||
|
||||
struct Preprocessor
|
||||
{
|
||||
Preprocessor(const char* _filePath, bool _essl, const char* _includeDir = NULL)
|
||||
Preprocessor(const char* _filePath, bool _essl)
|
||||
: m_tagptr(m_tags)
|
||||
, m_scratchPos(0)
|
||||
, m_fgetsPos(0)
|
||||
|
@ -459,11 +459,6 @@ namespace bgfx
|
|||
m_tagptr->data = scratch(_filePath);
|
||||
m_tagptr++;
|
||||
|
||||
if (NULL != _includeDir)
|
||||
{
|
||||
addInclude(_includeDir);
|
||||
}
|
||||
|
||||
if (!_essl)
|
||||
{
|
||||
m_default = "#define lowp\n#define mediump\n#define highp\n";
|
||||
|
@ -869,7 +864,13 @@ namespace bgfx
|
|||
bool preprocessOnly = cmdLine.hasArg("preprocess");
|
||||
const char* includeDir = cmdLine.findOption('i');
|
||||
|
||||
Preprocessor preprocessor(filePath, 0 != essl, includeDir);
|
||||
Preprocessor preprocessor(filePath, 0 != essl);
|
||||
|
||||
for (int ii = 1; NULL != includeDir; ++ii)
|
||||
{
|
||||
preprocessor.addInclude(includeDir);
|
||||
includeDir = cmdLine.findOption(ii, 'i');
|
||||
}
|
||||
|
||||
std::string dir;
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue