Lines Matching refs:uni
59 const struct gl_uniform_storage *const uni = &shProg->UniformStorage[index]; in _mesa_GetActiveUniformARB() local
62 _mesa_copy_string(nameOut, maxLength, length, uni->name); in _mesa_GetActiveUniformARB()
69 *size = MAX2(1, uni->array_elements); in _mesa_GetActiveUniformARB()
73 *type = uni->type->gl_type; in _mesa_GetActiveUniformARB()
109 const struct gl_uniform_storage *uni = &shProg->UniformStorage[index]; in _mesa_GetActiveUniformsiv() local
113 params[i] = uni->type->gl_type; in _mesa_GetActiveUniformsiv()
120 params[i] = MAX2(1, uni->array_elements); in _mesa_GetActiveUniformsiv()
124 params[i] = strlen(uni->name) + 1; in _mesa_GetActiveUniformsiv()
128 params[i] = uni->block_index; in _mesa_GetActiveUniformsiv()
132 params[i] = uni->offset; in _mesa_GetActiveUniformsiv()
136 params[i] = uni->array_stride; in _mesa_GetActiveUniformsiv()
140 params[i] = uni->matrix_stride; in _mesa_GetActiveUniformsiv()
144 params[i] = uni->row_major; in _mesa_GetActiveUniformsiv()
269 struct gl_uniform_storage *uni; in _mesa_get_uniform() local
276 uni = &shProg->UniformStorage[loc]; in _mesa_get_uniform()
279 unsigned elements = (uni->type->is_sampler()) in _mesa_get_uniform()
280 ? 1 : uni->type->components(); in _mesa_get_uniform()
286 &uni->storage[offset * elements]; in _mesa_get_uniform()
306 if (returnType == uni->type->base_type in _mesa_get_uniform()
311 (uni->type->base_type == GLSL_TYPE_INT in _mesa_get_uniform()
312 || uni->type->base_type == GLSL_TYPE_UINT in _mesa_get_uniform()
313 || uni->type->base_type == GLSL_TYPE_SAMPLER))) { in _mesa_get_uniform()
326 switch (uni->type->base_type) { in _mesa_get_uniform()
345 switch (uni->type->base_type) { in _mesa_get_uniform()
390 const struct gl_uniform_storage *uni) in log_uniform() argument
399 shProg->Name, extra, uni->name, location, uni->type->name, in log_uniform()
471 _mesa_propagate_uniforms_to_driver_storage(struct gl_uniform_storage *uni, in _mesa_propagate_uniforms_to_driver_storage() argument
479 const unsigned components = MAX2(1, uni->type->vector_elements); in _mesa_propagate_uniforms_to_driver_storage()
480 const unsigned vectors = MAX2(1, uni->type->matrix_columns); in _mesa_propagate_uniforms_to_driver_storage()
487 for (i = 0; i < uni->num_driver_storage; i++) { in _mesa_propagate_uniforms_to_driver_storage()
488 struct gl_uniform_driver_storage *const store = &uni->driver_storage[i]; in _mesa_propagate_uniforms_to_driver_storage()
493 (uint8_t *) (&uni->storage[array_index * (components * vectors)].i); in _mesa_propagate_uniforms_to_driver_storage()
584 struct gl_uniform_storage *uni; in _mesa_uniform() local
592 uni = &shProg->UniformStorage[loc]; in _mesa_uniform()
663 if (uni->type->is_sampler()) { in _mesa_uniform()
666 components = uni->type->vector_elements; in _mesa_uniform()
670 switch (uni->type->base_type) { in _mesa_uniform()
678 match = (basicType == uni->type->base_type); in _mesa_uniform()
682 if (uni->type->is_matrix() || components != src_components || !match) { in _mesa_uniform()
689 false, shProg, location, uni); in _mesa_uniform()
709 if (uni->type->is_sampler()) { in _mesa_uniform()
737 if (uni->array_elements != 0) { in _mesa_uniform()
738 count = MIN2(count, (int) (uni->array_elements - offset)); in _mesa_uniform()
745 if (!uni->type->is_boolean()) { in _mesa_uniform()
746 memcpy(&uni->storage[components * offset], values, in _mesa_uniform()
747 sizeof(uni->storage[0]) * components * count); in _mesa_uniform()
751 union gl_constant_value *dst = &uni->storage[components * offset]; in _mesa_uniform()
764 uni->initialized = true; in _mesa_uniform()
766 _mesa_propagate_uniforms_to_driver_storage(uni, offset, count); in _mesa_uniform()
771 if (uni->type->is_sampler()) { in _mesa_uniform()
775 shProg->SamplerUnits[uni->sampler + offset + i] = in _mesa_uniform()
837 struct gl_uniform_storage *uni; in _mesa_uniform_matrix() local
845 uni = &shProg->UniformStorage[loc]; in _mesa_uniform_matrix()
846 if (!uni->type->is_matrix()) { in _mesa_uniform_matrix()
852 assert(!uni->type->is_sampler()); in _mesa_uniform_matrix()
853 vectors = uni->type->matrix_columns; in _mesa_uniform_matrix()
854 components = uni->type->vector_elements; in _mesa_uniform_matrix()
877 bool(transpose), shProg, location, uni); in _mesa_uniform_matrix()
891 if (uni->array_elements != 0) { in _mesa_uniform_matrix()
892 count = MIN2(count, (int) (uni->array_elements - offset)); in _mesa_uniform_matrix()
902 memcpy(&uni->storage[elements * offset], values, in _mesa_uniform_matrix()
903 sizeof(uni->storage[0]) * elements * count); in _mesa_uniform_matrix()
908 float *dst = &uni->storage[elements * offset].f; in _mesa_uniform_matrix()
922 uni->initialized = true; in _mesa_uniform_matrix()
924 _mesa_propagate_uniforms_to_driver_storage(uni, offset, count); in _mesa_uniform_matrix()