glsl: Hook up the current GLSL 1.30 types and builtins for 1.40.
authorEric Anholt <eric@anholt.net>
Thu, 8 Mar 2012 21:49:15 +0000 (13:49 -0800)
committerEric Anholt <eric@anholt.net>
Thu, 15 Mar 2012 15:33:54 +0000 (08:33 -0700)
This gets a basic #version 140 shader compiling.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/builtin_variables.cpp
src/glsl/glsl_types.cpp
src/glsl/linker.cpp

index 66b3abdd84ce3b10de28d710834f1604185cfc04..26deeebdfc112023db0c7b04ad1d7396ac649192 100644 (file)
@@ -759,6 +759,9 @@ initialize_vs_variables(exec_list *instructions,
    case 130:
       generate_130_vs_variables(instructions, state);
       break;
+   case 140:
+      generate_130_vs_variables(instructions, state);
+      break;
    }
 
    if (state->ARB_draw_instanced_enable)
@@ -985,6 +988,9 @@ initialize_fs_variables(exec_list *instructions,
    case 130:
       generate_130_fs_variables(instructions, state);
       break;
+   case 140:
+      generate_130_fs_variables(instructions, state);
+      break;
    }
 
    if (state->ARB_shader_stencil_export_enable)
index 1489aae6d898d24fdf4fe4fe1946e51c07b17f98..a3271970482e16c2f59a2a0cef0e3b2f49af48fe 100644 (file)
@@ -257,6 +257,9 @@ _mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state)
    case 130:
       glsl_type::generate_130_types(state->symbols);
       break;
+   case 140:
+      glsl_type::generate_130_types(state->symbols);
+      break;
    default:
       /* error */
       break;
index 82bddb003c3fb0077f63da91b6e2b8a249210a23..39169aa10ff46891e7a84c05eda1ff7688835e70 100644 (file)
@@ -2175,7 +2175,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
     * of all shaders must match.
     */
    assert(min_version >= 100);
-   assert(max_version <= 130);
+   assert(max_version <= 140);
    if ((max_version >= 130 || min_version == 100)
        && min_version != max_version) {
       linker_error(prog, "all shaders must use same shading "