X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglsl%2Flinker.h;h=6ee58589835467f43d6216c57a073fe01b4059b1;hb=c4fab711ed5bbdb6b8421a1b980215032fc795b8;hp=0ce747d6cb92a44e513c097932bad1011e301063;hpb=b95d237fe6731055dad2ff3eaa59e4d6fc14bfff;p=mesa.git diff --git a/src/glsl/linker.h b/src/glsl/linker.h index 0ce747d6cb9..6ee58589835 100644 --- a/src/glsl/linker.h +++ b/src/glsl/linker.h @@ -26,19 +26,23 @@ #ifndef GLSL_LINKER_H #define GLSL_LINKER_H +ir_function_signature * +link_get_main_function_signature(gl_shader *sh); + extern bool link_function_calls(gl_shader_program *prog, gl_shader *main, gl_shader **shader_list, unsigned num_shaders); extern void -link_invalidate_variable_locations(gl_shader *sh, enum ir_variable_mode mode, - int generic_base); +link_invalidate_variable_locations(exec_list *ir); extern void -link_assign_uniform_locations(struct gl_shader_program *prog); +link_assign_uniform_locations(struct gl_shader_program *prog, + unsigned int boolean_true); extern void -link_set_uniform_initializers(struct gl_shader_program *prog); +link_set_uniform_initializers(struct gl_shader_program *prog, + unsigned int boolean_true); extern int link_cross_validate_uniform_block(void *mem_ctx, @@ -46,9 +50,6 @@ link_cross_validate_uniform_block(void *mem_ctx, unsigned int *num_linked_blocks, struct gl_uniform_block *new_block); -void -link_assign_uniform_block_offsets(struct gl_shader *shader); - extern bool link_uniform_blocks_are_compatible(const gl_uniform_block *a, const gl_uniform_block *b); @@ -66,9 +67,21 @@ validate_intrastage_interface_blocks(struct gl_shader_program *prog, unsigned num_shaders); void -validate_interstage_interface_blocks(struct gl_shader_program *prog, - const gl_shader *producer, - const gl_shader *consumer); +validate_interstage_inout_blocks(struct gl_shader_program *prog, + const gl_shader *producer, + const gl_shader *consumer); + +void +validate_interstage_uniform_blocks(struct gl_shader_program *prog, + gl_shader **stages, int num_stages); + +extern void +link_assign_atomic_counter_resources(struct gl_context *ctx, + struct gl_shader_program *prog); + +extern void +link_check_atomic_counter_resources(struct gl_context *ctx, + struct gl_shader_program *prog); /** * Class for processing all of the leaf fields of a variable that corresponds @@ -120,6 +133,23 @@ public: void process(const glsl_type *type, const char *name); protected: + /** + * Method invoked for each leaf of the variable + * + * \param type Type of the field. + * \param name Fully qualified name of the field. + * \param row_major For a matrix type, is it stored row-major. + * \param record_type Type of the record containing the field. + * \param last_field Set if \c name is the last field of the structure + * containing it. This will always be false for items + * not contained in a structure or interface block. + * + * The default implementation just calls the other \c visit_field method. + */ + virtual void visit_field(const glsl_type *type, const char *name, + bool row_major, const glsl_type *record_type, + bool last_field); + /** * Method invoked for each leaf of the variable * @@ -144,9 +174,13 @@ private: /** * \param name_length Length of the current name \b not including the * terminating \c NUL character. + * \param last_field Set if \c name is the last field of the structure + * containing it. This will always be false for items + * not contained in a structure or interface block. */ void recursion(const glsl_type *t, char **name, size_t name_length, - bool row_major); + bool row_major, const glsl_type *record_type, + bool last_field); }; void @@ -155,7 +189,4 @@ linker_error(gl_shader_program *prog, const char *fmt, ...); void linker_warning(gl_shader_program *prog, const char *fmt, ...); -unsigned -count_attribute_slots(const glsl_type *t); - #endif /* GLSL_LINKER_H */