Home | History | Annotate | Download | only in glsl

Lines Matching refs:Uniforms

40  * Assign locations for GLSL uniforms.
110 * Class to help calculate the storage requirements for a set of uniforms
112 * As uniforms are added to the active set the number of active uniforms and
113 * the storage requirements for those uniforms are accumulated. The active
114 * uniforms are added the the hash table supplied to the constructor.
135 * Total number of active uniforms counted
140 * Number of data values required to back the storage for the active uniforms
150 * Number of uniforms used in the current shader
186 * uniforms.
196 * Class to help parcel out pieces of backing storage to uniforms
213 struct gl_uniform_storage *uniforms,
215 : map(map), uniforms(uniforms), next_sampler(0), values(values)
246 ubo_var = &block->Uniforms[var->location];
276 if (this->uniforms[id].storage != NULL) {
281 const unsigned count = MAX2(1, this->uniforms[id].array_elements);
286 const unsigned s = this->uniforms[id].sampler + i;
298 this->uniforms[id].array_elements = type->length;
301 this->uniforms[id].array_elements = 0;
306 this->uniforms[id].sampler = this->next_sampler;
311 this->next_sampler += MAX2(1, this->uniforms[id].array_elements);
315 for (unsigned i = this->uniforms[id].sampler
324 this->uniforms[id].sampler = ~0;
327 this->uniforms[id].name = ralloc_strdup(this->uniforms, name);
328 this->uniforms[id].type = base_type;
329 this->uniforms[id].initialized = 0;
330 this->uniforms[id].num_driver_storage = 0;
331 this->uniforms[id].driver_storage = NULL;
332 this->uniforms[id].storage = this->values;
334 this->uniforms[id].block_index = this->ubo_block_index;
338 this->uniforms[id].offset = this->ubo_byte_offset;
342 this->uniforms[id].array_stride =
345 this->uniforms[id].array_stride = 0;
350 this->uniforms[id].matrix_stride = 16;
351 this->uniforms[id].row_major = ubo_var->RowMajor;
353 this->uniforms[id].matrix_stride = 0;
354 this->uniforms[id].row_major = false;
357 this->uniforms[id].block_index = -1;
358 this->uniforms[id].offset = -1;
359 this->uniforms[id].array_stride = -1;
360 this->uniforms[id].matrix_stride = -1;
361 this->uniforms[id].row_major = false;
369 struct gl_uniform_storage *uniforms;
408 if (strcmp(old_block->Uniforms[j].Name,
409 new_block->Uniforms[j].Name) != 0)
412 if (old_block->Uniforms[j].Offset !=
413 new_block->Uniforms[j].Offset)
416 if (old_block->Uniforms[j].RowMajor !=
417 new_block->Uniforms[j].RowMajor)
431 linked_block->Uniforms = ralloc_array(*linked_blocks,
435 memcpy(linked_block->Uniforms,
436 new_block->Uniforms,
437 sizeof(*linked_block->Uniforms) * linked_block->NumUniforms);
441 &linked_block->Uniforms[i];
469 if (!strcmp(var->name, shader->UniformBlocks[i].Uniforms[j].Name)) {
493 struct gl_uniform_buffer_variable *ubo_var = &block->Uniforms[i];
532 /* Uniforms that lack an initializer in the shader code have an initial
533 * value of zero. This includes sampler uniforms.
552 * uniforms. While this happens, each active uniform will have an index
573 /* FINISHME: Update code to process built-in uniforms!
589 /* On the outside chance that there were no uniforms, bail out.
594 struct gl_uniform_storage *uniforms =
597 rzalloc_array(uniforms, union gl_constant_value, num_data_slots);
602 parcel_out_uniform_storage parcel(prog->UniformHash, uniforms, data);
618 /* FINISHME: Update code to process built-in uniforms!
635 assert(uniforms[i].storage != NULL);
642 prog->UniformStorage = uniforms;