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-unused-function",
"-Wno-unused-parameter",
"-Wno-misleading-indentation",
}
removebuildoptions {
@ -363,6 +362,7 @@ project "fcpp"
configuration { "not vs*" }
buildoptions {
"-Wno-implicit-fallthrough",
"-Wno-parentheses-equality",
}
configuration {}

View File

@ -414,7 +414,7 @@ namespace bgfx
class File
{
public:
File(const char* _filePath)
File(const bx::FilePath& _filePath)
: m_data(NULL)
{
bx::FileReader reader;
@ -2402,18 +2402,23 @@ namespace bgfx
}
else
{
std::string defaultVarying = dir + "varying.def.sc";
const char* varyingdef = cmdLine.findOption("varyingdef", defaultVarying.c_str() );
File attribdef(varyingdef);
const char* parse = attribdef.getData();
if (NULL != parse
&& *parse != '\0')
const char* varying = NULL;
if ('c' != options.shaderType)
{
options.dependencies.push_back(varyingdef);
}
else
{
fprintf(stderr, "ERROR: Failed to parse varying def file: \"%s\" No input/output semantics will be generated in the code!\n", varyingdef);
std::string defaultVarying = dir + "varying.def.sc";
const char* varyingdef = cmdLine.findOption("varyingdef", defaultVarying.c_str() );
File attribdef(varyingdef);
varying = attribdef.getData();
if (NULL != varying
&& *varying != '\0')
{
options.dependencies.push_back(varyingdef);
}
else
{
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;
@ -2452,7 +2457,7 @@ namespace bgfx
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);
delete writer;