Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyperion modifications #3795

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions glslang/CInterface/glslang_c_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,16 @@ GLSLANG_EXPORT glslang_shader_t* glslang_shader_create(const glslang_input_t* in
return shader;
}

#ifdef HYP_GLSLANG_MODIFICATIONS
GLSLANG_EXPORT glslang::TShader* glslang_get_cpp_shader(glslang_shader_t* shader) {
return shader->shader;
}

GLSLANG_EXPORT glslang::TProgram* glslang_get_cpp_program(glslang_program_t* program) {
return program->program;
}
#endif

GLSLANG_EXPORT void glslang_shader_set_preamble(glslang_shader_t* shader, const char* s) {
shader->shader->setPreamble(s);
}
Expand Down
12 changes: 12 additions & 0 deletions glslang/Include/glslang_c_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "glslang_c_shader_types.h"
#include "visibility.h"

#ifdef HYP_GLSLANG_MODIFICATIONS
namespace glslang {
class TShader;
class TProgram;
} // namespace glslang
#endif

typedef struct glslang_shader_s glslang_shader_t;
typedef struct glslang_program_s glslang_program_t;
typedef struct glslang_mapper_s glslang_mapper_t;
Expand Down Expand Up @@ -245,6 +252,11 @@ typedef struct glslang_spv_options_s {
extern "C" {
#endif

#ifdef HYP_GLSLANG_MODIFICATIONS
GLSLANG_EXPORT glslang::TShader* glslang_get_cpp_shader(glslang_shader_t* shader);
GLSLANG_EXPORT glslang::TProgram* glslang_get_cpp_program(glslang_program_t* program);
#endif

GLSLANG_EXPORT void glslang_get_version(glslang_version_t* version);

GLSLANG_EXPORT int glslang_initialize_process(void);
Expand Down
6 changes: 6 additions & 0 deletions glslang/Public/ShaderLang.h
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,13 @@ class TProgram {
TIntermediate* intermediate[EShLangCount];
bool newedIntermediate[EShLangCount]; // track which intermediate were "new" versus reusing a singleton unit in a stage
TInfoSink* infoSink;
#ifdef HYP_GLSL_MODIFICATIONS // Make reflection member public
public:
#endif
TReflection* reflection;
#ifdef HYP_GLSL_MODIFICATIONS
private:
#endif
bool linked;

private:
Expand Down