glsl: Add sampler2DMS/sampler2DMSArray types to GLSL 1.50.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 19 Mar 2013 01:57:27 +0000 (18:57 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 20 Mar 2013 17:38:38 +0000 (10:38 -0700)
GLSL 1.50 includes support for the new sampler types introduced by
the ARB_texture_multisample extension.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/glsl/glsl_types.cpp
src/glsl/glsl_types.h

index a783dcc3b9cebb4c10e9a1c0fbb52d7f72ac537c..8b0a2480585de96b1e94e7d1c7f9c652f56ac1bb 100644 (file)
@@ -291,6 +291,14 @@ glsl_type::generate_140_types(glsl_symbol_table *symtab)
 }
 
 
+void
+glsl_type::generate_150_types(glsl_symbol_table *symtab)
+{
+   generate_140_types(symtab);
+   generate_ARB_texture_multisample_types(symtab, false);
+}
+
+
 void
 glsl_type::generate_ARB_texture_rectangle_types(glsl_symbol_table *symtab,
                                                bool warn)
@@ -385,9 +393,11 @@ _mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state)
          glsl_type::generate_130_types(state->symbols, true, skip_1d);
          break;
       case 140:
-      case 150:
          glsl_type::generate_140_types(state->symbols);
          break;
+      case 150:
+         glsl_type::generate_150_types(state->symbols);
+         break;
       default:
          assert(!"Unexpected language version");
          break;
index 79304269dfc8ae56f686f927f0070290929eae35..2f3b19f510711e887c0334d89a228c57c32dee0f 100644 (file)
@@ -583,6 +583,7 @@ private:
    static void generate_130_types(glsl_symbol_table *, bool add_deprecated,
                                   bool skip_1d);
    static void generate_140_types(glsl_symbol_table *);
+   static void generate_150_types(glsl_symbol_table *);
    static void generate_ARB_texture_rectangle_types(glsl_symbol_table *, bool);
    static void generate_EXT_texture_array_types(glsl_symbol_table *, bool);
    static void generate_OES_texture_3D_types(glsl_symbol_table *, bool);