Home | History | Annotate | Download | only in compiler

Lines Matching defs:glsl_type

31 mtx_t glsl_type::mutex = _MTX_INITIALIZER_NP;
32 hash_table *glsl_type::array_types = NULL;
33 hash_table *glsl_type::record_types = NULL;
34 hash_table *glsl_type::interface_types = NULL;
35 hash_table *glsl_type::function_types = NULL;
36 hash_table *glsl_type::subroutine_types = NULL;
37 void *glsl_type::mem_ctx = NULL;
40 glsl_type::init_ralloc_type_ctx(void)
42 if (glsl_type::mem_ctx == NULL) {
43 glsl_type::mem_ctx = ralloc_autofree_context();
44 assert(glsl_type::mem_ctx != NULL);
48 glsl_type::glsl_type(GLenum gl_type,
59 * glsl_type::sampled_type.
65 mtx_lock(&glsl_type::mutex);
71 mtx_unlock(&glsl_type::mutex);
79 glsl_type::glsl_type(GLenum gl_type, glsl_base_type base_type,
88 mtx_lock(&glsl_type::mutex);
94 mtx_unlock(&glsl_type::mutex);
106 glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields,
117 mtx_lock(&glsl_type::mutex);
131 mtx_unlock(&glsl_type::mutex);
134 glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields,
147 mtx_lock(&glsl_type::mutex);
160 mtx_unlock(&glsl_type::mutex);
163 glsl_type::glsl_type(const glsl_type *return_type,
174 mtx_lock(&glsl_type::mutex);
193 mtx_unlock(&glsl_type::mutex);
196 glsl_type::glsl_type(const char *subroutine_name) :
204 mtx_lock(&glsl_type::mutex);
209 mtx_unlock(&glsl_type::mutex);
213 glsl_type::contains_sampler() const
230 glsl_type::contains_integer() const
246 glsl_type::contains_double() const
262 glsl_type::contains_opaque() const {
283 glsl_type::contains_subroutine() const
299 glsl_type::sampler_index() const
301 const glsl_type *const t = (this->is_array()) ? this->fields.array : this;
329 glsl_type::contains_image() const
344 const glsl_type *glsl_type::get_base_type() const
363 const glsl_type *glsl_type::get_scalar_type() const
365 const glsl_type *type = this;
397 if (glsl_type::array_types != NULL) {
398 _mesa_hash_table_destroy(glsl_type::array_types, NULL);
399 glsl_type::array_types = NULL;
402 if (glsl_type::record_types != NULL) {
403 _mesa_hash_table_destroy(glsl_type::record_types, NULL);
404 glsl_type::record_types = NULL;
407 if (glsl_type::interface_types != NULL) {
408 _mesa_hash_table_destroy(glsl_type::interface_types, NULL);
409 glsl_type::interface_types = NULL;
414 glsl_type::glsl_type(const glsl_type *array, unsigned length) :
434 mtx_lock(&glsl_type::mutex);
436 mtx_unlock(&glsl_type::mutex);
459 const glsl_type *
460 glsl_type::vec(unsigned components)
465 static const glsl_type *const ts[] = {
471 const glsl_type *
472 glsl_type::dvec(unsigned components)
477 static const glsl_type *const ts[] = {
483 const glsl_type *
484 glsl_type::ivec(unsigned components)
489 static const glsl_type *const ts[] = {
496 const glsl_type *
497 glsl_type::uvec(unsigned components)
502 static const glsl_type *const ts[] = {
509 const glsl_type *
510 glsl_type::bvec(unsigned components)
515 static const glsl_type *const ts[] = {
522 const glsl_type *
523 glsl_type::get_instance(unsigned base_type, unsigned rows, unsigned columns)
596 const glsl_type *
597 glsl_type::get_sampler_instance(enum glsl_sampler_dim dim,
717 const glsl_type *
718 glsl_type::get_image_instance(enum glsl_sampler_dim dim,
816 const glsl_type *
817 glsl_type::get_array_instance(const glsl_type *base, unsigned array_size)
827 mtx_lock(&glsl_type::mutex);
836 mtx_unlock(&glsl_type::mutex);
837 const glsl_type *t = new glsl_type(base, array_size);
838 mtx_lock(&glsl_type::mutex);
845 assert(((glsl_type *) entry->data)->base_type == GLSL_TYPE_ARRAY);
846 assert(((glsl_type *) entry->data)->length == array_size);
847 assert(((glsl_type *) entry->data)->fields.array == base);
849 mtx_unlock(&glsl_type::mutex);
851 return (glsl_type *) entry->data;
856 glsl_type::record_compare(const glsl_type *b, bool match_locations) const
942 glsl_type::record_key_compare(const void *a, const void *b)
944 const glsl_type *const key1 = (glsl_type *) a;
945 const glsl_type *const key2 = (glsl_type *) b;
952 * Generate an integer hash value for a glsl_type structure type.
955 glsl_type::record_key_hash(const void *a)
957 const glsl_type *const key = (glsl_type *) a;
975 const glsl_type *
976 glsl_type::get_record_instance(const glsl_struct_field *fields,
980 const glsl_type key(fields, num_fields, name);
982 mtx_lock(&glsl_type::mutex);
992 mtx_unlock(&glsl_type::mutex);
993 const glsl_type *t = new glsl_type(fields, num_fields, name);
994 mtx_lock(&glsl_type::mutex);
999 assert(((glsl_type *) entry->data)->base_type == GLSL_TYPE_STRUCT);
1000 assert(((glsl_type *) entry->data)->length == num_fields);
1001 assert(strcmp(((glsl_type *) entry->data)->name, name) == 0);
1003 mtx_unlock(&glsl_type::mutex);
1005 return (glsl_type *) entry->data;
1009 const glsl_type *
1010 glsl_type::get_interface_instance(const glsl_struct_field *fields,
1016 const glsl_type key(fields, num_fields, packing, row_major, block_name);
1018 mtx_lock(&glsl_type::mutex);
1028 mtx_unlock(&glsl_type::mutex);
1029 const glsl_type *t = new glsl_type(fields, num_fields,
1031 mtx_lock(&glsl_type::mutex);
1036 assert(((glsl_type *) entry->data)->base_type == GLSL_TYPE_INTERFACE);
1037 assert(((glsl_type *) entry->data)->length == num_fields);
1038 assert(strcmp(((glsl_type *) entry->data)->name, block_name) == 0);
1040 mtx_unlock(&glsl_type::mutex);
1042 return (glsl_type *) entry->data;
1045 const glsl_type *
1046 glsl_type::get_subroutine_instance(const char *subroutine_name)
1048 const glsl_type key(subroutine_name);
1050 mtx_lock(&glsl_type::mutex);
1060 mtx_unlock(&glsl_type::mutex);
1061 const glsl_type *t = new glsl_type(subroutine_name);
1062 mtx_lock(&glsl_type::mutex);
1067 assert(((glsl_type *) entry->data)->base_type == GLSL_TYPE_SUBROUTINE);
1068 assert(strcmp(((glsl_type *) entry->data)->name, subroutine_name) == 0);
1070 mtx_unlock(&glsl_type::mutex);
1072 return (glsl_type *) entry->data;
1079 const glsl_type *const key1 = (glsl_type *) a;
1080 const glsl_type *const key2 = (glsl_type *) b;
1093 const glsl_type *const key = (glsl_type *) a;
1098 const glsl_type *
1099 glsl_type::get_function_instance(const glsl_type *return_type,
1103 const glsl_type key(return_type, params, num_params);
1105 mtx_lock(&glsl_type::mutex);
1114 mtx_unlock(&glsl_type::mutex);
1115 const glsl_type *t = new glsl_type(return_type, params, num_params);
1116 mtx_lock(&glsl_type::mutex);
1121 const glsl_type *t = (const glsl_type *)entry->data;
1126 mtx_unlock(&glsl_type::mutex);
1132 const glsl_type *
1133 glsl_type::get_mul_type(const glsl_type *type_a, const glsl_type *type_b)
1149 const glsl_type *const type =
1166 const glsl_type *const type =
1185 const glsl_type *const type =
1199 const glsl_type *
1200 glsl_type::field_type(const char *name) const
1216 glsl_type::field_index(const char *name) const
1232 glsl_type::component_slots() const
1274 glsl_type::record_location_offset(unsigned length) const
1277 const glsl_type *t = this->without_array();
1282 const glsl_type *st = t->fields.structure[i].type;
1283 const glsl_type *wa = st->without_array();
1290 const glsl_type *base_type = st->fields.array;
1315 glsl_type::uniform_locations() const
1343 glsl_type::varying_count() const
1375 glsl_type::can_implicitly_convert_to(const glsl_type *desired,
1427 glsl_type::std140_base_alignment(bool row_major) const
1494 const struct glsl_type *vec_type, *array_type;
1500 array_type = glsl_type::get_array_instance(vec_type, r);
1503 array_type = glsl_type::get_array_instance(vec_type, c);
1533 const struct glsl_type *field_type = this->fields.structure[i].type;
1545 glsl_type::std140_size(bool row_major) const
1582 const struct glsl_type *element_type;
1583 const struct glsl_type *vec_type;
1604 const glsl_type *array_type = glsl_type::get_array_instance(vec_type,
1657 const struct glsl_type *field_type = this->fields.structure[i].type;
1681 glsl_type::std430_base_alignment(bool row_major) const
1740 const struct glsl_type *vec_type, *array_type;
1746 array_type = glsl_type::get_array_instance(vec_type, r);
1749 array_type = glsl_type::get_array_instance(vec_type, c);
1779 const struct glsl_type *field_type = this->fields.structure[i].type;
1791 glsl_type::std430_array_stride(bool row_major) const
1809 glsl_type::std430_size(bool row_major) const
1825 const struct glsl_type *element_type;
1826 const struct glsl_type *vec_type;
1847 const glsl_type *array_type = glsl_type::get_array_instance(vec_type,
1876 const struct glsl_type *field_type = this->fields.structure[i].type;
1892 glsl_type::count_attribute_slots(bool is_vertex_input) const
1959 glsl_type::coordinate_components() const
1998 * Declarations of type flyweights (glsl_type::_foo_type) and
1999 * convenience pointers (glsl_type::foo_type).
2003 const glsl_type glsl_type::_##NAME##_type = glsl_type(__VA_ARGS__, #NAME); \
2004 const glsl_type *const glsl_type::NAME##_type = &glsl_type::_##NAME##_type;