Lines Matching refs:uni
262 struct gl_uniform_storage *const uni = shProg->UniformRemapTable[location];
268 if (uni->builtin)
271 if (uni->array_elements == 0) {
275 caller, count, uni->name.string, location);
279 assert((location - uni->remap_location) == 0);
285 *array_index = location - uni->remap_location;
290 if (*array_index >= uni->array_elements) {
296 return uni;
311 struct gl_uniform_storage *const uni =
314 if (uni == NULL) {
348 unsigned elements = uni->type->components();
349 unsigned components = uni->type->vector_elements;
352 int dmul = (uni->type->is_64bit()) ? 2 : 1;
354 if ((uni->type->is_sampler() || uni->type->is_image()) &&
355 !uni->is_bindless) {
367 (uni->is_bindless || !uni->type->contains_opaque())) {
371 if (glsl_base_type_is_16bit(uni->type->base_type)) {
373 uni->type->matrix_columns;
376 src = (gl_constant_value *) uni->driver_storage[0].data +
379 src = &uni->storage[offset * elements * dmul];
399 if (returnType == uni->type->base_type ||
401 (uni->type->is_sampler() || uni->type->is_image())) ||
402 (returnType == GLSL_TYPE_UINT64 && uni->is_bindless)) {
415 if (glsl_base_type_is_16bit(uni->type->base_type)) {
423 switch (uni->type->base_type) {
463 switch (uni->type->base_type) {
514 switch (uni->type->base_type) {
570 switch (uni->type->base_type) {
621 switch (uni->type->base_type) {
671 switch (uni->type->base_type) {
736 const struct gl_uniform_storage *uni)
745 shProg->Name, extra, uni->name.string, location, uni->type->name,
825 * \param uni Uniform whose data is to be propagated to driver storage
826 * \param array_index If \c uni is an array, this is the element of
831 _mesa_propagate_uniforms_to_driver_storage(struct gl_uniform_storage *uni,
837 const unsigned components = uni->type->vector_elements;
838 const unsigned vectors = uni->type->matrix_columns;
839 const int dmul = uni->type->is_64bit() ? 2 : 1;
846 for (i = 0; i < uni->num_driver_storage; i++) {
847 struct gl_uniform_driver_storage *const store = &uni->driver_storage[i];
852 (uint8_t *) (&uni->storage[array_index * (dmul * components * vectors)].i);
1146 struct gl_uniform_storage *const uni =
1149 if (uni == NULL)
1152 if (uni->type->is_matrix()) {
1156 src_components, uni->name.string, location);
1161 const unsigned components = uni->type->vector_elements;
1167 src_components, uni->name.string, location,
1173 switch (uni->type->base_type) {
1187 match = (basicType == uni->type->base_type);
1194 src_components, uni->name.string, location,
1195 glsl_type_name(uni->type->base_type),
1202 false, shProg, location, uni);
1222 if (uni->type->is_sampler()) {
1240 if (uni->type->is_image()) {
1254 return uni;
1259 const struct gl_uniform_storage *uni)
1262 if (!uni->is_bindless && uni->type->contains_opaque()) {
1264 if (!uni->type->is_sampler())
1270 unsigned mask = uni->active_shader_mask;
1285 struct gl_uniform_storage *uni,
1292 bool copy_as_uint64 = uni->is_bindless &&
1293 (uni->type->is_sampler() || uni->type->is_image());
1294 bool copy_to_float16 = uni->type->base_type == GLSL_TYPE_FLOAT16;
1296 if (!uni->type->is_boolean() && !copy_as_uint64 && !copy_to_float16) {
1303 _mesa_flush_vertices_for_uniforms(ctx, uni);
1320 _mesa_flush_vertices_for_uniforms(ctx, uni);
1356 _mesa_flush_vertices_for_uniforms(ctx, uni);
1384 _mesa_flush_vertices_for_uniforms(ctx, uni);
1408 _mesa_flush_vertices_for_uniforms(ctx, uni);
1440 struct gl_uniform_storage *uni;
1454 uni = shProg->UniformRemapTable[location];
1455 if (!uni || uni == INACTIVE_UNIFORM_EXPLICIT_LOCATION)
1461 assert(uni->array_elements > 0 || location == (int)uni->remap_location);
1462 offset = location - uni->remap_location;
1464 uni = validate_uniform(location, count, values, &offset, ctx, shProg,
1466 if (!uni)
1470 const unsigned components = uni->type->vector_elements;
1483 if (uni->array_elements != 0) {
1484 count = MIN2(count, (int) (uni->array_elements - offset));
1492 (uni->is_bindless || !uni->type->contains_opaque())) {
1493 for (unsigned s = 0; s < uni->num_driver_storage; s++) {
1497 if (glsl_base_type_is_16bit(uni->type->base_type))
1501 uni->driver_storage[s].data + (size_mul * offset * dword_components);
1503 if (copy_uniforms_to_storage(storage, uni, ctx, count, values, size_mul,
1508 storage = &uni->storage[size_mul * components * offset];
1509 if (copy_uniforms_to_storage(storage, uni, ctx, count, values, size_mul,
1511 _mesa_propagate_uniforms_to_driver_storage(uni, offset, count);
1518 if (!ctx_flushed && !(uni->type->is_sampler() && uni->is_bindless))
1524 if (uni->type->is_sampler()) {
1538 if (!uni->opaque[i].active)
1543 unsigned unit = uni->opaque[i].index + offset + j;
1546 if (uni->is_bindless) {
1590 if (uni->type->is_image()) {
1595 if (!uni->opaque[i].active)
1599 unsigned unit = uni->opaque[i].index + offset + j;
1602 if (uni->is_bindless) {
1625 struct gl_uniform_storage *const uni,
1636 if (uni->type->base_type == GLSL_TYPE_FLOAT16) {
1654 _mesa_flush_vertices_for_uniforms(ctx, uni);
1701 _mesa_flush_vertices_for_uniforms(ctx, uni);
1740 _mesa_flush_vertices_for_uniforms(ctx, uni);
1757 _mesa_flush_vertices_for_uniforms(ctx, uni);
1801 _mesa_flush_vertices_for_uniforms(ctx, uni);
1847 struct gl_uniform_storage *const uni =
1850 if (uni == NULL)
1864 if (!uni->type->is_matrix()) {
1873 assert(!uni->type->is_sampler());
1874 const unsigned vectors = uni->type->matrix_columns;
1875 const unsigned components = uni->type->vector_elements;
1902 if (uni->type->base_type != basicType &&
1903 !(uni->type->base_type == GLSL_TYPE_FLOAT16 &&
1907 cols, rows, uni->name.string, location,
1908 glsl_type_name(uni->type->base_type),
1914 log_uniform(values, uni->type->base_type, components, vectors, count,
1915 bool(transpose), shProg, location, uni);
1929 if (uni->array_elements != 0) {
1930 count = MIN2(count, (int) (uni->array_elements - offset));
1940 for (unsigned s = 0; s < uni->num_driver_storage; s++) {
1944 if (glsl_base_type_is_16bit(uni->type->base_type))
1948 uni->driver_storage[s].data +
1951 if (copy_uniform_matrix_to_storage(ctx, storage, uni, count, values,
1958 storage = &uni->storage[size_mul * elements * offset];
1959 if (copy_uniform_matrix_to_storage(ctx, storage, uni, count, values,
1963 _mesa_propagate_uniforms_to_driver_storage(uni, offset, count);
2009 struct gl_uniform_storage *uni;
2021 uni = shProg->UniformRemapTable[location];
2022 if (!uni || uni == INACTIVE_UNIFORM_EXPLICIT_LOCATION)
2028 assert(uni->array_elements > 0 || location == (int)uni->remap_location);
2029 offset = location - uni->remap_location;
2031 uni = validate_uniform_parameters(location, count, &offset,
2033 if (!uni)
2036 if (!uni->is_bindless) {
2055 const unsigned components = uni->type->vector_elements;
2060 false, shProg, location, uni);
2074 if (uni->array_elements != 0) {
2075 count = MIN2(count, (int) (uni->array_elements - offset));
2084 for (unsigned s = 0; s < uni->num_driver_storage; s++) {
2086 uni->driver_storage[s].data + (size_mul * offset * components);
2087 unsigned size = sizeof(uni->storage[0]) * components * count * size_mul;
2093 _mesa_flush_vertices_for_uniforms(ctx, uni);
2101 void *storage = &uni->storage[size_mul * components * offset];
2102 unsigned size = sizeof(uni->storage[0]) * components * count * size_mul;
2107 _mesa_flush_vertices_for_uniforms(ctx, uni);
2109 _mesa_propagate_uniforms_to_driver_storage(uni, offset, count);
2112 if (uni->type->is_sampler()) {
2120 if (!uni->opaque[i].active)
2124 unsigned unit = uni->opaque[i].index + offset + j;
2135 if (uni->type->is_image()) {
2143 if (!uni->opaque[i].active)
2147 unsigned unit = uni->opaque[i].index + offset + j;