Add setSourceFile and addSourceText to TShader

These are now accessible through the C++ ShaderLang.h public API as well
as the C API.
This commit is contained in:
Arcady Goldmints-Orlov 2024-08-09 15:26:47 -06:00 committed by arcady-lunarg
parent 7c4d91e781
commit 3ba8cad6ed
2 changed files with 6 additions and 0 deletions

View File

@ -1858,6 +1858,9 @@ void TShader::setGlobalUniformBinding(unsigned int binding) { intermediate->setG
void TShader::setAtomicCounterBlockName(const char* name) { intermediate->setAtomicCounterBlockName(name); }
void TShader::setAtomicCounterBlockSet(unsigned int set) { intermediate->setAtomicCounterBlockSet(set); }
void TShader::addSourceText(const char* text, size_t len) { intermediate->addSourceText(text, len); }
void TShader::setSourceFile(const char* file) { intermediate->setSourceFile(file); }
#ifdef ENABLE_HLSL
// See comment above TDefaultHlslIoMapper in iomapper.cpp:
void TShader::setHlslIoMapping(bool hlslIoMap) { intermediate->setHlslIoMapping(hlslIoMap); }

View File

@ -510,6 +510,9 @@ public:
GLSLANG_EXPORT void setAtomicCounterBlockSet(unsigned int set);
GLSLANG_EXPORT void setAtomicCounterBlockBinding(unsigned int binding);
GLSLANG_EXPORT void addSourceText(const char* text, size_t len);
GLSLANG_EXPORT void setSourceFile(const char* file);
// For setting up the environment (cleared to nothingness in the constructor).
// These must be called so that parsing is done for the right source language and
// target environment, either indirectly through TranslateEnvironment() based on