glsl: remove UBO fields from _mesa_glsl_parse_state
authorChia-I Wu <olvaffe@gmail.com>
Thu, 20 Mar 2014 07:50:36 +0000 (15:50 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Tue, 1 Apr 2014 05:41:20 +0000 (13:41 +0800)
They are not needed since 514f8c7ec7cc1ab18be93cebb5b9bf970b1955a9.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/glsl_parser_extras.cpp
src/glsl/glsl_parser_extras.h
src/mesa/main/mtypes.h

index 61ae62150fe3bf5b29a0470476f0c8ded41ba8c1..8422ba6f00b7e31805bf4e19b57d4ae95fbcff0c 100644 (file)
@@ -66,10 +66,6 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
    this->translation_unit.make_empty();
    this->symbols = new(mem_ctx) glsl_symbol_table;
 
-   this->num_uniform_blocks = 0;
-   this->uniform_block_array_size = 0;
-   this->uniform_blocks = NULL;
-
    this->info_log = ralloc_strdup(mem_ctx, "");
    this->error = false;
    this->loop_nesting_ast = NULL;
@@ -1464,12 +1460,6 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
    shader->IsES = state->es_shader;
    shader->uses_builtin_functions = state->uses_builtin_functions;
 
-   if (shader->UniformBlocks)
-      ralloc_free(shader->UniformBlocks);
-   shader->NumUniformBlocks = state->num_uniform_blocks;
-   shader->UniformBlocks = state->uniform_blocks;
-   ralloc_steal(shader, shader->UniformBlocks);
-
    if (!state->error)
       set_shader_inout_layout(shader, state);
 
index 300d9005117f8957a4c4ed31e2274037bf69391b..3ad205c07f29872836d40baf181b3ac1ba8be250 100644 (file)
@@ -175,10 +175,6 @@ struct _mesa_glsl_parse_state {
    exec_list translation_unit;
    glsl_symbol_table *symbols;
 
-   unsigned num_uniform_blocks;
-   unsigned uniform_block_array_size;
-   struct gl_uniform_block *uniform_blocks;
-
    unsigned num_supported_versions;
    struct {
       unsigned ver;
index 33cb88881364ba63653d5e43d6516307bbb81a6d..15c0a5931b35157931edea5fc9b0e17f9225f0d3 100644 (file)
@@ -2421,8 +2421,7 @@ struct gl_shader
    /**
     * This shader's uniform block information.
     *
-    * The offsets of the variables are assigned only for shaders in a program's
-    * _LinkedShaders[].
+    * These fields are only set post-linking.
     */
    struct gl_uniform_block *UniformBlocks;
    unsigned NumUniformBlocks;