aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r--src/compiler/glsl/linker.cpp2
-rw-r--r--src/compiler/glsl/standalone_scaffolding.cpp9
-rw-r--r--src/compiler/glsl/standalone_scaffolding.h5
3 files changed, 16 insertions, 0 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index c6bf3b16736..f4f918a34e7 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -2208,6 +2208,8 @@ link_intrastage_shaders(void *mem_ctx,
return NULL;
}
+ _mesa_reference_shader_program_data(ctx, &gl_prog->sh.data, prog->data);
+
/* Don't use _mesa_reference_program() just take ownership */
linked->Program = gl_prog;
diff --git a/src/compiler/glsl/standalone_scaffolding.cpp b/src/compiler/glsl/standalone_scaffolding.cpp
index 9160ba03e90..546ba722ed3 100644
--- a/src/compiler/glsl/standalone_scaffolding.cpp
+++ b/src/compiler/glsl/standalone_scaffolding.cpp
@@ -54,6 +54,15 @@ _mesa_warning(struct gl_context *ctx, const char *fmt, ...)
}
void
+_mesa_reference_shader_program_data(struct gl_context *ctx,
+ struct gl_shader_program_data **ptr,
+ struct gl_shader_program_data *data)
+{
+ (void) ctx;
+ *ptr = data;
+}
+
+void
_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
struct gl_shader *sh)
{
diff --git a/src/compiler/glsl/standalone_scaffolding.h b/src/compiler/glsl/standalone_scaffolding.h
index 790ff4a251c..5d179191fbf 100644
--- a/src/compiler/glsl/standalone_scaffolding.h
+++ b/src/compiler/glsl/standalone_scaffolding.h
@@ -39,6 +39,11 @@ extern "C" void
_mesa_warning(struct gl_context *ctx, const char *fmtString, ... );
extern "C" void
+_mesa_reference_shader_program_data(struct gl_context *ctx,
+ struct gl_shader_program_data **ptr,
+ struct gl_shader_program_data *data);
+
+extern "C" void
_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
struct gl_shader *sh);