[Mesa-dev] [PATCH 6/6] glsl_to_tgsi: only associate the uniform storage once at link time

Marek Olšák maraeo at gmail.com
Sat Apr 11 12:12:34 PDT 2015


From: Marek Olšák <marek.olsak at amd.com>

This hack is no longer needed. (see the previous commit)
---
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 7542f0d..0d826aa 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -5116,15 +5116,6 @@ st_translate_program(
    t->outputMapping = outputMapping;
    t->ureg = ureg;
 
-   if (program->shader_program) {
-      for (i = 0; i < program->shader_program->NumUserUniformStorage; i++) {
-         struct gl_uniform_storage *const storage =
-               &program->shader_program->UniformStorage[i];
-
-         _mesa_uniform_detach_all_driver_storage(storage);
-      }
-   }
-
    /*
     * Declare input attributes.
     */
@@ -5359,21 +5350,6 @@ st_translate_program(
                        t->insn[t->labels[i].branch_target]);
    }
 
-   if (program->shader_program) {
-      /* This has to be done last.  Any operation the can cause
-       * prog->ParameterValues to get reallocated (e.g., anything that adds a
-       * program constant) has to happen before creating this linkage.
-       */
-      for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
-         if (program->shader_program->_LinkedShaders[i] == NULL ||
-             program->shader_program->_LinkedShaders[i]->Program == NULL)
-            continue;
-
-         _mesa_associate_uniform_storage(ctx, program->shader_program,
-               program->shader_program->_LinkedShaders[i]->Program->Parameters);
-      }
-   }
-
 out:
    if (t) {
       free(t->temps);
-- 
2.1.0



More information about the mesa-dev mailing list