mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 02:25:37 -05:00
Fixed MinGW compile error.
This commit is contained in:
parent
81d6876067
commit
55d9a43a3c
2 changed files with 17 additions and 11 deletions
15
makefile
15
makefile
|
@ -217,12 +217,14 @@ OS=darwin
|
|||
BUILD_PROJECT_DIR=gmake-osx
|
||||
BUILD_OUTPUT_DIR=osx64_clang
|
||||
BUILD_TOOLS_CONFIG=release64
|
||||
BUILD_TOOLS_SUFFIX=Release
|
||||
EXE=
|
||||
else
|
||||
OS=linux
|
||||
BUILD_PROJECT_DIR=gmake-linux
|
||||
BUILD_OUTPUT_DIR=linux64_gcc
|
||||
BUILD_TOOLS_CONFIG=release64
|
||||
BUILD_TOOLS_SUFFIX=Release
|
||||
EXE=
|
||||
endif
|
||||
else
|
||||
|
@ -230,19 +232,16 @@ OS=windows
|
|||
BUILD_PROJECT_DIR=gmake-mingw-gcc
|
||||
BUILD_OUTPUT_DIR=win32_mingw-gcc
|
||||
BUILD_TOOLS_CONFIG=release32
|
||||
BUILD_TOOLS_SUFFIX=Release
|
||||
EXE=.exe
|
||||
endif
|
||||
|
||||
.build/$(BUILD_OUTPUT_DIR)/bin/shadercRelease$(EXE): .build/projects/$(BUILD_PROJECT_DIR)
|
||||
tools/bin/$(OS)/shaderc$(EXE): .build/projects/$(BUILD_PROJECT_DIR)
|
||||
$(SILENT) make -C .build/projects/$(BUILD_PROJECT_DIR) -f shaderc.make config=$(BUILD_TOOLS_CONFIG)
|
||||
$(SILENT) cp .build/$(BUILD_OUTPUT_DIR)/bin/shaderc$(BUILD_TOOLS_SUFFIX)$(EXE) $(@)
|
||||
|
||||
tools/bin/$(OS)/shaderc$(EXE): .build/$(BUILD_OUTPUT_DIR)/bin/shadercRelease$(EXE)
|
||||
$(SILENT) cp $(<) $(@)
|
||||
|
||||
.build/$(BUILD_OUTPUT_DIR)/bin/geometrycRelease$(EXE): .build/projects/$(BUILD_PROJECT_DIR)
|
||||
tools/bin/$(OS)/geometryc$(EXE): .build/projects/$(BUILD_PROJECT_DIR)
|
||||
$(SILENT) make -C .build/projects/$(BUILD_PROJECT_DIR) -f geometryc.make config=$(BUILD_TOOLS_CONFIG)
|
||||
|
||||
tools/bin/$(OS)/geometryc$(EXE): .build/$(BUILD_OUTPUT_DIR)/bin/geometrycRelease$(EXE)
|
||||
$(SILENT) cp $(<) $(@)
|
||||
$(SILENT) cp .build/$(BUILD_OUTPUT_DIR)/bin/geometryc$(BUILD_TOOLS_SUFFIX)$(EXE) $(@)
|
||||
|
||||
tools: tools/bin/$(OS)/shaderc$(EXE) tools/bin/$(OS)/geometryc$(EXE)
|
||||
|
|
|
@ -8,6 +8,13 @@
|
|||
#if SHADERC_CONFIG_DIRECT3D11
|
||||
|
||||
#include <d3dcompiler.h>
|
||||
#include <d3d11shader.h>
|
||||
|
||||
#ifndef D3D_SVF_USED
|
||||
# define D3D_SVF_USED 2
|
||||
#endif // D3D_SVF_USED
|
||||
|
||||
static const GUID GUID_ID3D11ShaderReflection = { 0x0a233719, 0x3960, 0x4578, { 0x9d, 0x7c, 0x20, 0x3b, 0x8b, 0x1d, 0x9c, 0xc1 } };
|
||||
|
||||
struct RemapInputSemantic
|
||||
{
|
||||
|
@ -202,7 +209,7 @@ bool compileHLSLShaderDx11(bx::CommandLine& _cmdLine, const std::string& _code,
|
|||
ID3D11ShaderReflection* reflect = NULL;
|
||||
hr = D3DReflect(code->GetBufferPointer()
|
||||
, code->GetBufferSize()
|
||||
, IID_ID3D11ShaderReflection
|
||||
, GUID_ID3D11ShaderReflection
|
||||
, (void**)&reflect
|
||||
);
|
||||
if (FAILED(hr) )
|
||||
|
@ -370,7 +377,7 @@ bool compileHLSLShaderDx11(bx::CommandLine& _cmdLine, const std::string& _code,
|
|||
ID3DBlob* stripped;
|
||||
hr = D3DStripShader(code->GetBufferPointer()
|
||||
, code->GetBufferSize()
|
||||
, D3DCOMPILER_STRIP_REFLECTION_DATA
|
||||
, D3DCOMPILER_STRIP_REFLECTION_DATA
|
||||
| D3DCOMPILER_STRIP_TEST_BLOBS
|
||||
, &stripped
|
||||
);
|
||||
|
@ -437,4 +444,4 @@ bool compileHLSLShaderDx11(bx::CommandLine& _cmdLine, const std::string& _code,
|
|||
return false;
|
||||
}
|
||||
|
||||
#endif // SHADERC_CONFIG_DIRECT3D11
|
||||
#endif // SHADERC_CONFIG_DIRECT3D11
|
||||
|
|
Loading…
Reference in a new issue