[Mesa-dev] [PATCH 2/4] glsl: make a bunch of varying linking functions static
Timothy Arceri
timothy.arceri at collabora.com
Thu Dec 29 03:15:11 UTC 2016
---
src/compiler/glsl/link_varyings.cpp | 12 +++++-----
src/compiler/glsl/link_varyings.h | 48 -------------------------------------
2 files changed, 6 insertions(+), 54 deletions(-)
diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp
index cd04e6e..fc340f9 100644
--- a/src/compiler/glsl/link_varyings.cpp
+++ b/src/compiler/glsl/link_varyings.cpp
@@ -106,7 +106,7 @@ create_xfb_varying_names(void *mem_ctx, const glsl_type *t, char **name,
}
}
-bool
+static bool
process_xfb_layout_qualifiers(void *mem_ctx, const gl_linked_shader *sh,
struct gl_shader_program *prog,
unsigned *num_tfeedback_decls,
@@ -575,7 +575,7 @@ cross_validate_outputs_to_inputs(struct gl_shader_program *prog,
* Demote shader inputs and outputs that are not used in other stages, and
* remove them via dead code elimination.
*/
-void
+static void
remove_unused_shader_inputs_and_outputs(bool is_separate_shader_object,
gl_linked_shader *sh,
enum ir_variable_mode mode)
@@ -1018,7 +1018,7 @@ tfeedback_decl::find_candidate(gl_shader_program *prog,
* If an error occurs, the error is reported through linker_error() and false
* is returned.
*/
-bool
+static bool
parse_tfeedback_decls(struct gl_context *ctx, struct gl_shader_program *prog,
const void *mem_ctx, unsigned num_names,
char **varying_names, tfeedback_decl *decls)
@@ -1073,7 +1073,7 @@ cmp_xfb_offset(const void * x_generic, const void * y_generic)
* If an error occurs, the error is reported through linker_error() and false
* is returned.
*/
-bool
+static bool
store_tfeedback_info(struct gl_context *ctx, struct gl_shader_program *prog,
unsigned num_tfeedback_decls,
tfeedback_decl *tfeedback_decls, bool has_xfb_qualifiers)
@@ -1995,7 +1995,7 @@ canonicalize_shader_io(exec_list *ir, enum ir_variable_mode io_mode)
* 64 bit map. Per-vertex and per-patch both have separate location domains
* with a max of MAX_VARYING.
*/
-uint64_t
+static uint64_t
reserved_varying_slot(struct gl_linked_shader *stage,
ir_variable_mode io_mode)
{
@@ -2052,7 +2052,7 @@ reserved_varying_slot(struct gl_linked_shader *stage,
* be NULL. In this case, varying locations are assigned solely based on the
* requirements of transform feedback.
*/
-bool
+static bool
assign_varying_locations(struct gl_context *ctx,
void *mem_ctx,
struct gl_shader_program *prog,
diff --git a/src/compiler/glsl/link_varyings.h b/src/compiler/glsl/link_varyings.h
index 560d0ee..177efe5 100644
--- a/src/compiler/glsl/link_varyings.h
+++ b/src/compiler/glsl/link_varyings.h
@@ -297,52 +297,4 @@ cross_validate_outputs_to_inputs(struct gl_shader_program *prog,
gl_linked_shader *producer,
gl_linked_shader *consumer);
-bool
-parse_tfeedback_decls(struct gl_context *ctx, struct gl_shader_program *prog,
- const void *mem_ctx, unsigned num_names,
- char **varying_names, tfeedback_decl *decls);
-
-bool
-process_xfb_layout_qualifiers(void *mem_ctx, const gl_linked_shader *sh,
- struct gl_shader_program *prog,
- unsigned *num_tfeedback_decls,
- char ***varying_names);
-
-void
-remove_unused_shader_inputs_and_outputs(bool is_separate_shader_object,
- gl_linked_shader *sh,
- enum ir_variable_mode mode);
-
-bool
-store_tfeedback_info(struct gl_context *ctx, struct gl_shader_program *prog,
- unsigned num_tfeedback_decls,
- tfeedback_decl *tfeedback_decls,
- bool has_xfb_qualifiers);
-
-bool
-assign_varying_locations(struct gl_context *ctx,
- void *mem_ctx,
- struct gl_shader_program *prog,
- gl_linked_shader *producer,
- gl_linked_shader *consumer,
- unsigned num_tfeedback_decls,
- tfeedback_decl *tfeedback_decls,
- const uint64_t reserved_slots);
-
-uint64_t
-reserved_varying_slot(struct gl_linked_shader *stage,
- ir_variable_mode io_mode);
-
-bool
-check_against_output_limit(struct gl_context *ctx,
- struct gl_shader_program *prog,
- gl_linked_shader *producer,
- unsigned num_explicit_locations);
-
-bool
-check_against_input_limit(struct gl_context *ctx,
- struct gl_shader_program *prog,
- gl_linked_shader *consumer,
- unsigned num_explicit_locations);
-
#endif /* GLSL_LINK_VARYINGS_H */
--
2.9.3
More information about the mesa-dev
mailing list