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

Timothy Arceri timothy.arceri at collabora.com
Sat Sep 24 05:24: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 4d3fc6d..220065f 100644
--- a/src/compiler/glsl/link_uniforms.cpp
+++ b/src/compiler/glsl/link_uniforms.cpp
@@ -1268,6 +1268,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 85aeb1e..56b0601 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2817,7 +2817,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.7.4



More information about the mesa-dev mailing list