diff --git a/scripts/shaderc.lua b/scripts/shaderc.lua index 049fe8191..fd5209d66 100644 --- a/scripts/shaderc.lua +++ b/scripts/shaderc.lua @@ -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 {} diff --git a/tools/shaderc/shaderc.cpp b/tools/shaderc/shaderc.cpp index 71ad9fe70..354bbbc85 100644 --- a/tools/shaderc/shaderc.cpp +++ b/tools/shaderc/shaderc.cpp @@ -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;