[Mesa-dev] [PATCH 05/68] glsl: add new uniform fields to be used to restore state from cache

Timothy Arceri timothy.arceri at collabora.com
Wed Jun 1 06:22:46 UTC 2016


From: Carl Worth <cworth at cworth.org>

Signed-off-by: Timothy Arceri <timothy.arceri at collabora.com>
---
 src/compiler/glsl/link_uniforms.cpp | 2 ++
 src/mesa/main/mtypes.h              | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/compiler/glsl/link_uniforms.cpp b/src/compiler/glsl/link_uniforms.cpp
index ff2989f..e517b7e 100644
--- a/src/compiler/glsl/link_uniforms.cpp
+++ b/src/compiler/glsl/link_uniforms.cpp
@@ -1260,6 +1260,8 @@ link_assign_uniform_locations(struct gl_shader_program *prog,
    prog->NumUniformStorage = num_uniforms;
    prog->NumHiddenUniforms = hidden_uniforms;
    prog->UniformStorage = uniforms;
+   prog->NumUniformDataSlots = num_data_slots;
+   prog->UniformDataSlots = data;
 
    link_set_uniform_initializers(prog, boolean_true);
 
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 2233526..1a9ef8f 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2800,7 +2800,8 @@ struct gl_shader_program
    unsigned NumUniformStorage;
    unsigned NumHiddenUniforms;
    struct gl_uniform_storage *UniformStorage;
-
+   unsigned NumUniformDataSlots;
+   union gl_constant_value *UniformDataSlots;
    /**
     * Mapping from GL uniform locations returned by \c glUniformLocation to
     * UniformStorage entries. Arrays will have multiple contiguous slots
-- 
2.5.5



More information about the mesa-dev mailing list