CInterface: Add OpSource support.
Add interface for `TIntermediate::addSourceText` and `TIntermediate::setSourceFile`.
This commit is contained in:
parent
adbf0d3106
commit
ea024d2bfc
3 changed files with 39 additions and 3 deletions
|
|
@ -38,6 +38,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "glslang/Include/ResourceLimits.h"
|
||||
#include "glslang/MachineIndependent/Versions.h"
|
||||
#include "glslang/MachineIndependent/localintermediate.h"
|
||||
|
||||
static_assert(int(GLSLANG_STAGE_COUNT) == EShLangCount, "");
|
||||
static_assert(int(GLSLANG_STAGE_MASK_COUNT) == EShLanguageMaskCount, "");
|
||||
|
|
@ -455,6 +456,16 @@ GLSLANG_EXPORT int glslang_program_link(glslang_program_t* program, int messages
|
|||
return (int)program->program->link((EShMessages)messages);
|
||||
}
|
||||
|
||||
GLSLANG_EXPORT void glslang_program_add_source_text(glslang_program_t* program, glslang_stage_t stage, const char* text, size_t len) {
|
||||
glslang::TIntermediate* intermediate = program->program->getIntermediate(c_shader_stage(stage));
|
||||
intermediate->addSourceText(text, len);
|
||||
}
|
||||
|
||||
GLSLANG_EXPORT void glslang_program_set_source_file(glslang_program_t* program, glslang_stage_t stage, const char* file) {
|
||||
glslang::TIntermediate* intermediate = program->program->getIntermediate(c_shader_stage(stage));
|
||||
intermediate->setSourceFile(file);
|
||||
}
|
||||
|
||||
GLSLANG_EXPORT int glslang_program_map_io(glslang_program_t* program)
|
||||
{
|
||||
return (int)program->program->mapIO();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue