summaryrefslogtreecommitdiffstats
path: root/HLSL2GLSLConverter/src/HLSL2GLSLConverterApp.cpp
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-02-20 05:27:10 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-02-20 05:27:10 +0000
commitd5ef23db30db8b17077c76051050ddbb9b9e0968 (patch)
treea8e25a6699dbfeb20d57ee9126e25229b5da9adc /HLSL2GLSLConverter/src/HLSL2GLSLConverterApp.cpp
parentUpdated IRenderDevice::CreateTexture and IRenderDevice::CreateBuffer to take ... (diff)
downloadDiligentTools-d5ef23db30db8b17077c76051050ddbb9b9e0968.tar.gz
DiligentTools-d5ef23db30db8b17077c76051050ddbb9b9e0968.zip
HLSL2GLSLConverterApp: use InOutLocations flag
Diffstat (limited to 'HLSL2GLSLConverter/src/HLSL2GLSLConverterApp.cpp')
-rw-r--r--HLSL2GLSLConverter/src/HLSL2GLSLConverterApp.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/HLSL2GLSLConverter/src/HLSL2GLSLConverterApp.cpp b/HLSL2GLSLConverter/src/HLSL2GLSLConverterApp.cpp
index 0516fb5..3a3f566 100644
--- a/HLSL2GLSLConverter/src/HLSL2GLSLConverterApp.cpp
+++ b/HLSL2GLSLConverter/src/HLSL2GLSLConverterApp.cpp
@@ -60,6 +60,8 @@ void PrintHelp()
LOG_INFO_MESSAGE(" hs - domain shader");
LOG_INFO_MESSAGE(" cs - domain shader\n");
LOG_INFO_MESSAGE("-noglsldef Do not include glsl definitions into the converted source\n");
+ LOG_INFO_MESSAGE("-nolocations Do not use shader input/output locations qualifiers.\n"
+ " Shader stage interface linking will rely on exact name matching.\n");
}
// Main
@@ -79,6 +81,7 @@ int main(int argc, char** argv)
SHADER_TYPE ShaderType = SHADER_TYPE_UNKNOWN;
bool CompileShader = false;
bool IncludeGLSLDefintions = true;
+ bool UseInOutLocations = true;
for (int a = 1; a < argc; ++a) {
if (_stricmp(argv[a], "-h") == 0)
{
@@ -125,6 +128,10 @@ int main(int argc, char** argv)
{
IncludeGLSLDefintions = false;
}
+ else if (_stricmp(argv[a], "-nolocations") == 0)
+ {
+ UseInOutLocations = false;
+ }
else
{
LOG_ERROR_MESSAGE("Unknow command line option ", argv[a]);
@@ -173,7 +180,7 @@ int main(int argc, char** argv)
RefCntAutoPtr<IHLSL2GLSLConversionStream> pStream;
Converter.CreateStream(InputPath.c_str(), &BasicSSSFactory, HLSLSource, SourceLen, &pStream);
RefCntAutoPtr<Diligent::IDataBlob> pGLSLSourceBlob;
- pStream->Convert(EntryPoint.c_str(), ShaderType, IncludeGLSLDefintions, "_sampler", &pGLSLSourceBlob);
+ pStream->Convert(EntryPoint.c_str(), ShaderType, IncludeGLSLDefintions, "_sampler", UseInOutLocations, &pGLSLSourceBlob);
if(!pGLSLSourceBlob)return -1;
LOG_INFO_MESSAGE("Done");