The series is

Reviewed-by: Ian Romanick <ian.d.roman...@intel.com>

On 11/19/2012 10:21 PM, Kenneth Graunke wrote:
---
  src/mesa/drivers/common/meta.c | 24 +++++++++++++-----------
  1 file changed, 13 insertions(+), 11 deletions(-)

These should probably go to the gles3 branch, not master.

Yes, for now.

This one's not observed to fix any conformance tests...I just found it
while looking at the Clear shader in the next patch.

diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 417dbd0..8a19d52 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -3101,18 +3101,19 @@ setup_glsl_generate_mipmap(struct gl_context *ctx,
                                    sampler->func, sampler->texcoords);
     }
     else {
-      vs_source =
-         "#version 130\n"
-         "in vec2 position;\n"
-         "in vec3 textureCoords;\n"
-         "out vec3 texCoords;\n"
-         "void main()\n"
-         "{\n"
-         "   texCoords = textureCoords;\n"
-         "   gl_Position = vec4(position, 0.0, 1.0);\n"
-         "}\n";
+      vs_source = ralloc_asprintf(mem_ctx,
+                                  "#version %s\n"
+                                  "in vec2 position;\n"
+                                  "in vec3 textureCoords;\n"
+                                  "out vec3 texCoords;\n"
+                                  "void main()\n"
+                                  "{\n"
+                                  "   texCoords = textureCoords;\n"
+                                  "   gl_Position = vec4(position, 0.0, 
1.0);\n"
+                                  "}\n",
+                                  _mesa_is_desktop_gl(ctx) ? "130" : "300 es");
        fs_source = ralloc_asprintf(mem_ctx,
-                                  "#version 130\n"
+                                  "#version %s\n"
                                    "uniform %s texSampler;\n"
                                    "in vec3 texCoords;\n"
                                    "out vec4 out_color;\n"
@@ -3121,6 +3122,7 @@ setup_glsl_generate_mipmap(struct gl_context *ctx,
                                    "{\n"
                                    "   out_color = texture(texSampler, %s);\n"
                                    "}\n",
+                                  _mesa_is_desktop_gl(ctx) ? "130" : "300 es",
                                    sampler->type,
                                    sampler->texcoords);
     }


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to