Branimir Karadžić 8 лет назад
Родитель
Сommit
1218981a22
4 измененных файлов с 11 добавлено и 11 удалено
  1. 4 4
      tools/shaderc/shaderc.h
  2. 2 2
      tools/shaderc/shaderc_glsl.cpp
  3. 3 3
      tools/shaderc/shaderc_hlsl.cpp
  4. 2 2
      tools/shaderc/shaderc_spirv.cpp

+ 4 - 4
tools/shaderc/shaderc.h

@@ -129,10 +129,10 @@ namespace bgfx
 	int32_t writef(bx::WriterI* _writer, const char* _format, ...);
 	int32_t writef(bx::WriterI* _writer, const char* _format, ...);
 	void writeFile(const char* _filePath, const void* _data, int32_t _size);
 	void writeFile(const char* _filePath, const void* _data, int32_t _size);
 
 
-	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);
+	bool compileGLSLShader(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer);
+	bool compileHLSLShader(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer);
+	bool compilePSSLShader(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer);
+	bool compileSPIRVShader(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer);
 
 
 } // namespace bgfx
 } // namespace bgfx
 
 

+ 2 - 2
tools/shaderc/shaderc_glsl.cpp

@@ -8,7 +8,7 @@
 
 
 namespace bgfx { namespace glsl
 namespace bgfx { namespace glsl
 {
 {
-	static bool compile(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer)
+	static bool compile(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer)
 	{
 	{
 		char ch = char(tolower(_cmdLine.findOption('\0', "type")[0]) );
 		char ch = char(tolower(_cmdLine.findOption('\0', "type")[0]) );
 		const glslopt_shader_type type = ch == 'f'
 		const glslopt_shader_type type = ch == 'f'
@@ -306,7 +306,7 @@ namespace bgfx { namespace glsl
 
 
 } // namespace glsl
 } // namespace glsl
 
 
-	bool compileGLSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer)
+	bool compileGLSLShader(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer)
 	{
 	{
 		return glsl::compile(_cmdLine, _version, _code, _writer);
 		return glsl::compile(_cmdLine, _version, _code, _writer);
 	}
 	}

+ 3 - 3
tools/shaderc/shaderc_hlsl.cpp

@@ -545,7 +545,7 @@ namespace bgfx { namespace hlsl
 		return true;
 		return true;
 	}
 	}
 
 
-	static bool compile(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer, bool _firstPass)
+	static bool compile(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer, bool _firstPass)
 	{
 	{
 		const char* profile = _cmdLine.findOption('p', "profile");
 		const char* profile = _cmdLine.findOption('p', "profile");
 		if (NULL == profile)
 		if (NULL == profile)
@@ -806,7 +806,7 @@ namespace bgfx { namespace hlsl
 
 
 } // namespace hlsl
 } // namespace hlsl
 
 
-	bool compileHLSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer)
+	bool compileHLSLShader(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer)
 	{
 	{
 		return hlsl::compile(_cmdLine, _version, _code, _writer, true);
 		return hlsl::compile(_cmdLine, _version, _code, _writer, true);
 	}
 	}
@@ -817,7 +817,7 @@ namespace bgfx { namespace hlsl
 
 
 namespace bgfx
 namespace bgfx
 {
 {
-	bool compileHLSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer)
+	bool compileHLSLShader(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer)
 	{
 	{
 		BX_UNUSED(_cmdLine, _version, _code, _writer);
 		BX_UNUSED(_cmdLine, _version, _code, _writer);
 		fprintf(stderr, "HLSL compiler is not supported on this platform.\n");
 		fprintf(stderr, "HLSL compiler is not supported on this platform.\n");

+ 2 - 2
tools/shaderc/shaderc_spirv.cpp

@@ -545,7 +545,7 @@ namespace bgfx { namespace spirv
 //		fprintf(stderr, "%s\n", _message);
 //		fprintf(stderr, "%s\n", _message);
 //	}
 //	}
 
 
-	static bool compile(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer)
+	static bool compile(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer)
 	{
 	{
 		BX_UNUSED(_cmdLine, _version, _code, _writer);
 		BX_UNUSED(_cmdLine, _version, _code, _writer);
 
 
@@ -767,7 +767,7 @@ namespace bgfx { namespace spirv
 
 
 } // namespace spirv
 } // namespace spirv
 
 
-	bool compileSPIRVShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer)
+	bool compileSPIRVShader(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer)
 	{
 	{
 		return spirv::compile(_cmdLine, _version, _code, _writer);
 		return spirv::compile(_cmdLine, _version, _code, _writer);
 	}
 	}