CInterface: added glslang_program_SPIRV_get_ptr()
authorSergey Kosarevsky <sk@linderdaum.com>
Tue, 24 Dec 2019 22:01:06 +0000 (01:01 +0300)
committerSergey Kosarevsky <sk@linderdaum.com>
Tue, 24 Dec 2019 22:01:06 +0000 (01:01 +0300)
glslang/CInterface/glslang_c_interface.cpp
glslang/Include/glslang_c_interface.h

index 302efad..02a3171 100644 (file)
@@ -394,6 +394,11 @@ void glslang_program_SPIRV_get(glslang_program_t* program, unsigned int* out)
     memcpy(out, program->spirv.data(), program->spirv.size() * sizeof(unsigned int));
 }
 
+unsigned int* glslang_program_SPIRV_get_ptr(glslang_program_t* program)
+{
+       return program->spirv.data();
+}
+
 const char* glslang_program_SPIRV_get_messages(glslang_program_t* program)
 {
     return program->loggerMessages.empty() ? nullptr : program->loggerMessages.c_str();
index 2521fb2..eeff408 100644 (file)
@@ -107,6 +107,7 @@ int glslang_program_link(glslang_program_t* program, int messages); // glslang_m
 void glslang_program_SPIRV_generate(glslang_program_t* program, glslang_stage_t stage);
 size_t glslang_program_SPIRV_get_size(glslang_program_t* program);
 void glslang_program_SPIRV_get(glslang_program_t* program, unsigned int*);
+unsigned int* glslang_program_SPIRV_get_ptr(glslang_program_t* program);
 const char* glslang_program_SPIRV_get_messages(glslang_program_t* program);
 const char* glslang_program_get_info_log(glslang_program_t* program);
 const char* glslang_program_get_info_debug_log(glslang_program_t* program);