This commit is contained in:
Branimir Karadžić 2018-11-27 18:14:29 -08:00
parent 979fe2d91e
commit d4fef78240
2 changed files with 19 additions and 14 deletions

View File

@ -310,7 +310,6 @@ project "glsl-optimizer"
"-Wno-sign-compare", "-Wno-sign-compare",
"-Wno-unused-function", "-Wno-unused-function",
"-Wno-unused-parameter", "-Wno-unused-parameter",
"-Wno-misleading-indentation",
} }
removebuildoptions { removebuildoptions {
@ -363,6 +362,7 @@ project "fcpp"
configuration { "not vs*" } configuration { "not vs*" }
buildoptions { buildoptions {
"-Wno-implicit-fallthrough", "-Wno-implicit-fallthrough",
"-Wno-parentheses-equality",
} }
configuration {} configuration {}

View File

@ -414,7 +414,7 @@ namespace bgfx
class File class File
{ {
public: public:
File(const char* _filePath) File(const bx::FilePath& _filePath)
: m_data(NULL) : m_data(NULL)
{ {
bx::FileReader reader; bx::FileReader reader;
@ -2401,13 +2401,17 @@ namespace bgfx
fprintf(stderr, "Unable to open file '%s'.\n", filePath); fprintf(stderr, "Unable to open file '%s'.\n", filePath);
} }
else else
{
const char* varying = NULL;
if ('c' != options.shaderType)
{ {
std::string defaultVarying = dir + "varying.def.sc"; std::string defaultVarying = dir + "varying.def.sc";
const char* varyingdef = cmdLine.findOption("varyingdef", defaultVarying.c_str() ); const char* varyingdef = cmdLine.findOption("varyingdef", defaultVarying.c_str() );
File attribdef(varyingdef); File attribdef(varyingdef);
const char* parse = attribdef.getData(); varying = attribdef.getData();
if (NULL != parse if (NULL != varying
&& *parse != '\0') && *varying != '\0')
{ {
options.dependencies.push_back(varyingdef); options.dependencies.push_back(varyingdef);
} }
@ -2415,6 +2419,7 @@ namespace bgfx
{ {
fprintf(stderr, "ERROR: Failed to parse varying def file: \"%s\" No input/output semantics will be generated in the code!\n", varyingdef); fprintf(stderr, "ERROR: Failed to parse varying def file: \"%s\" No input/output semantics will be generated in the code!\n", varyingdef);
} }
}
const size_t padding = 16384; const size_t padding = 16384;
uint32_t size = (uint32_t)bx::getSize(&reader); uint32_t size = (uint32_t)bx::getSize(&reader);
@ -2452,7 +2457,7 @@ namespace bgfx
return bx::kExitFailure; return bx::kExitFailure;
} }
compiled = compileShader(attribdef.getData(), commandLineComment.c_str(), data, size, options, writer); compiled = compileShader(varying, commandLineComment.c_str(), data, size, options, writer);
bx::close(writer); bx::close(writer);
delete writer; delete writer;