diff options
author | Timothy Arceri <[email protected]> | 2016-12-20 21:37:25 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-12-31 09:48:51 +1100 |
commit | 68245aa6f5f832ba3066fb65050ff79ad3e5531c (patch) | |
tree | ab1099d0ff35577fbae59c108b05d93cdbd5958f /src/mesa | |
parent | 9d99dc4bc1fda9906e8dc576d6116fbdb05f67ac (diff) |
glsl/mesa: add reference to gl_shader_program_data from gl_program
We also add the stubs for the standalone compiler in this change.
By adding a reference here we can now refactor some code to use
gl_program where we were previously awkwardly using gl_shader_program.
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/mtypes.h | 3 | ||||
-rw-r--r-- | src/mesa/program/program.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 39ae6674614..c7535a37761 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1952,6 +1952,9 @@ struct gl_program struct { /** Fields used by GLSL programs */ struct { + /** Data shared by gl_program and gl_shader_program */ + struct gl_shader_program_data *data; + struct gl_active_atomic_buffer **AtomicBuffers; /** Post-link transform feedback info. */ diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c index 27ae1c6d0ee..b728d862e54 100644 --- a/src/mesa/program/program.c +++ b/src/mesa/program/program.c @@ -34,6 +34,7 @@ #include "main/framebuffer.h" #include "main/hash.h" #include "main/macros.h" +#include "main/shaderobj.h" #include "program.h" #include "prog_cache.h" #include "prog_parameter.h" @@ -313,6 +314,7 @@ _mesa_reference_program_(struct gl_context *ctx, if (deleteFlag) { assert(ctx); + _mesa_reference_shader_program_data(ctx, &oldProg->sh.data, NULL); ctx->Driver.DeleteProgram(ctx, oldProg); } |