glsl: add new uniform fields to be used to restore state from cache

Signed-off-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Carl Worth
2016-04-14 10:48:19 +10:00
committed by Timothy Arceri
parent 0f60c6616e
commit b8cb1a05cd
2 changed files with 8 additions and 0 deletions

View File

@@ -1265,6 +1265,10 @@ link_assign_uniform_storage(struct gl_context *ctx,
link_setup_uniform_remap_tables(ctx, prog);
/* Set shader cache fields */
prog->data->NumUniformDataSlots = num_data_slots;
prog->data->UniformDataSlots = data;
link_set_uniform_initializers(prog, boolean_true);
}

View File

@@ -2662,6 +2662,10 @@ struct gl_shader_program_data
struct gl_active_atomic_buffer *AtomicBuffers;
unsigned NumAtomicBuffers;
/* Shader cache variables used during restore */
unsigned NumUniformDataSlots;
union gl_constant_value *UniformDataSlots;
/** List of all active resources after linking. */
struct gl_program_resource *ProgramResourceList;
unsigned NumProgramResourceList;