shaderc: Added SPIR-V stub.

This commit is contained in:
Branimir Karadžić 2016-09-30 20:03:16 -07:00
parent ece1a0e49b
commit 2380221c81
4 changed files with 23 additions and 1 deletions

View File

@ -10,7 +10,7 @@ function overridefiles(_srcPath, _dstPath, _files)
for _, file in ipairs(_files) do
file = path.getrelative(_srcPath, file)
local filePath = path.join(BGFX_DIR, "../bgfx-ext", file)
if not os.isfile(filePath) then print(filePath .. " not found") return end
if not os.isfile(filePath) then return end
table.insert(remove, path.join(_srcPath, file))
table.insert(add, filePath)

View File

@ -118,4 +118,8 @@ project "shaderc"
path.join(BGFX_DIR, "tools/shaderc/shaderc_pssl.cpp"),
})
overridefiles(BGFX_DIR, path.join(BGFX_DIR, "../bgfx-ext"), {
path.join(BGFX_DIR, "tools/shaderc/shaderc_spirv.cpp"),
})
strip()

View File

@ -132,6 +132,7 @@ namespace bgfx
bool compileGLSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer);
bool compileHLSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer);
bool compilePSSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer);
bool compileSPIRVShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer);
} // namespace bgfx

View File

@ -0,0 +1,17 @@
/*
* Copyright 2011-2016 Branimir Karadzic. All rights reserved.
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
#include "shaderc.h"
namespace bgfx
{
bool compileSPIRVShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer)
{
BX_UNUSED(_cmdLine, _version, _code, _writer);
fprintf(stderr, "SPIR-V compiler is not supported.\n");
return false;
}
} // namespace bgfx