[Mesa-dev] [PATCH] glsl: disable resource checking in the linker until it's done right

Marek Olšák maraeo at gmail.com
Sun Nov 20 13:15:18 PST 2011


---
 src/glsl/linker.cpp |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 3527088..8089255 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -2230,8 +2230,28 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
    link_assign_uniform_locations(prog);
    store_fragdepth_layout(prog);
 
+   /* This is disabled for now because the checks are breaking a lot of apps.
+    * The two shaders below should be linked without errors. There are
+    * backends which can run these shaders just fine.
+    *
+    * This shader uses 2 uniform components:
+    *      uniform float array[1234];
+    *      void main() {
+    *         gl_FragColor = vec4(array[769] + array[342]);
+    *      }
+    *
+    * And this shader uses 2 varying components:
+    *      varying float array[64];
+    *      void main() {
+    *         gl_FragColor = vec4(array[28] + array[49]);
+    *      }
+    */
+#if 0
    if (!check_resources(ctx, prog))
       goto done;
+#else
+   (void) check_resources;
+#endif
 
    /* OpenGL ES requires that a vertex shader and a fragment shader both be
     * present in a linked program.  By checking for use of shading language
-- 
1.7.5.4



More information about the mesa-dev mailing list