glsl: Remove unused "instructions" parameter.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 1 Jan 2011 20:01:09 +0000 (12:01 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 1 Jan 2011 20:01:54 +0000 (12:01 -0800)
I think was used long ago, when we actually read the builtins into the
shader's instruction stream directly, rather than creating a separate
shader and linking the two.  It doesn't seem to serve any purpose now.

src/glsl/ast_to_hir.cpp
src/glsl/builtin_function.cpp
src/glsl/builtins/tools/generate_builtins.py
src/glsl/ir.h

index 741cd19e9d3f4a4848f82af1f9c60a2afefaf00f..2baeffc067fd8b2546f3be4173dd3eb834375cd8 100644 (file)
@@ -60,7 +60,7 @@ void
 _mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state)
 {
    _mesa_glsl_initialize_variables(instructions, state);
-   _mesa_glsl_initialize_functions(instructions, state);
+   _mesa_glsl_initialize_functions(state);
 
    state->symbols->language_version = state->language_version;
 
index 1c6d59d5a21ab63820d282777473a5ec3db11eab..b9db141b3c25bd5016a788561c07ebc654347711 100644 (file)
@@ -13523,7 +13523,6 @@ _mesa_glsl_release_functions(void)
 
 static void
 _mesa_read_profile(struct _mesa_glsl_parse_state *state,
-                  exec_list *instructions,
                    int profile_index,
                   const char *prototypes,
                   const char **functions,
@@ -13542,8 +13541,7 @@ _mesa_read_profile(struct _mesa_glsl_parse_state *state,
 }
 
 void
-_mesa_glsl_initialize_functions(exec_list *instructions,
-                                struct _mesa_glsl_parse_state *state)
+_mesa_glsl_initialize_functions(struct _mesa_glsl_parse_state *state)
 {
    if (builtin_mem_ctx == NULL) {
       builtin_mem_ctx = talloc_init("GLSL built-in functions");
@@ -13553,84 +13551,84 @@ _mesa_glsl_initialize_functions(exec_list *instructions,
    state->num_builtins_to_link = 0;
 
    if (state->target == fragment_shader && state->language_version == 100) {
-      _mesa_read_profile(state, instructions, 0,
+      _mesa_read_profile(state, 0,
                          prototypes_for_100_frag,
                          functions_for_100_frag,
                          Elements(functions_for_100_frag));
    }
 
    if (state->target == vertex_shader && state->language_version == 100) {
-      _mesa_read_profile(state, instructions, 1,
+      _mesa_read_profile(state, 1,
                          prototypes_for_100_vert,
                          functions_for_100_vert,
                          Elements(functions_for_100_vert));
    }
 
    if (state->target == fragment_shader && state->language_version == 110) {
-      _mesa_read_profile(state, instructions, 2,
+      _mesa_read_profile(state, 2,
                          prototypes_for_110_frag,
                          functions_for_110_frag,
                          Elements(functions_for_110_frag));
    }
 
    if (state->target == vertex_shader && state->language_version == 110) {
-      _mesa_read_profile(state, instructions, 3,
+      _mesa_read_profile(state, 3,
                          prototypes_for_110_vert,
                          functions_for_110_vert,
                          Elements(functions_for_110_vert));
    }
 
    if (state->target == fragment_shader && state->language_version == 120) {
-      _mesa_read_profile(state, instructions, 4,
+      _mesa_read_profile(state, 4,
                          prototypes_for_120_frag,
                          functions_for_120_frag,
                          Elements(functions_for_120_frag));
    }
 
    if (state->target == vertex_shader && state->language_version == 120) {
-      _mesa_read_profile(state, instructions, 5,
+      _mesa_read_profile(state, 5,
                          prototypes_for_120_vert,
                          functions_for_120_vert,
                          Elements(functions_for_120_vert));
    }
 
    if (state->target == fragment_shader && state->language_version == 130) {
-      _mesa_read_profile(state, instructions, 6,
+      _mesa_read_profile(state, 6,
                          prototypes_for_130_frag,
                          functions_for_130_frag,
                          Elements(functions_for_130_frag));
    }
 
    if (state->target == vertex_shader && state->language_version == 130) {
-      _mesa_read_profile(state, instructions, 7,
+      _mesa_read_profile(state, 7,
                          prototypes_for_130_vert,
                          functions_for_130_vert,
                          Elements(functions_for_130_vert));
    }
 
    if (state->target == fragment_shader && state->ARB_texture_rectangle_enable) {
-      _mesa_read_profile(state, instructions, 8,
+      _mesa_read_profile(state, 8,
                          prototypes_for_ARB_texture_rectangle_frag,
                          functions_for_ARB_texture_rectangle_frag,
                          Elements(functions_for_ARB_texture_rectangle_frag));
    }
 
    if (state->target == vertex_shader && state->ARB_texture_rectangle_enable) {
-      _mesa_read_profile(state, instructions, 9,
+      _mesa_read_profile(state, 9,
                          prototypes_for_ARB_texture_rectangle_vert,
                          functions_for_ARB_texture_rectangle_vert,
                          Elements(functions_for_ARB_texture_rectangle_vert));
    }
 
    if (state->target == fragment_shader && state->EXT_texture_array_enable) {
-      _mesa_read_profile(state, instructions, 10,
+      _mesa_read_profile(state, 10,
                          prototypes_for_EXT_texture_array_frag,
                          functions_for_EXT_texture_array_frag,
                          Elements(functions_for_EXT_texture_array_frag));
    }
 
    if (state->target == vertex_shader && state->EXT_texture_array_enable) {
-      _mesa_read_profile(state, instructions, 11,
+      _mesa_read_profile(state, 11,
                          prototypes_for_EXT_texture_array_vert,
                          functions_for_EXT_texture_array_vert,
                          Elements(functions_for_EXT_texture_array_vert));
index 5ea4b5c48f46a07320002c07863cdb3104a86977..e2de9dbcdca6cc37b5d5d5b4c9d83e4e8bd67c88 100755 (executable)
@@ -200,7 +200,6 @@ _mesa_glsl_release_functions(void)
 
 static void
 _mesa_read_profile(struct _mesa_glsl_parse_state *state,
-                  exec_list *instructions,
                    int profile_index,
                   const char *prototypes,
                   const char **functions,
@@ -219,8 +218,7 @@ _mesa_read_profile(struct _mesa_glsl_parse_state *state,
 }
 
 void
-_mesa_glsl_initialize_functions(exec_list *instructions,
-                                struct _mesa_glsl_parse_state *state)
+_mesa_glsl_initialize_functions(struct _mesa_glsl_parse_state *state)
 {
    if (builtin_mem_ctx == NULL) {
       builtin_mem_ctx = talloc_init("GLSL built-in functions");
@@ -244,7 +242,7 @@ _mesa_glsl_initialize_functions(exec_list *instructions,
             check += 'state->' + version + '_enable'
 
         print '   if (' + check + ') {'
-        print '      _mesa_read_profile(state, instructions, %d,' % i
+        print '      _mesa_read_profile(state, %d,' % i
         print '                         prototypes_for_' + profile + ','
         print '                         functions_for_' + profile + ','
         print '                         Elements(functions_for_' + profile + '));'
index 102a68b65516a207d7f7bf29c78a60a0330d00be..9668c9439adfd7c5ed1f684da227c60b70ae6e34 100644 (file)
@@ -1582,8 +1582,7 @@ _mesa_glsl_initialize_variables(exec_list *instructions,
                                struct _mesa_glsl_parse_state *state);
 
 extern void
-_mesa_glsl_initialize_functions(exec_list *instructions,
-                               struct _mesa_glsl_parse_state *state);
+_mesa_glsl_initialize_functions(_mesa_glsl_parse_state *state);
 
 extern void
 _mesa_glsl_release_functions(void);