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

Timothy Arceri timothy.arceri at collabora.com
Fri Apr 29 13:33:04 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 92f1095..8180d10 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 46b1543..17100e4 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2753,7 +2753,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