Lines Matching refs:shProg

101                      struct gl_shader_program *const shProg, GLuint index,
125 shProg->AttributeBindings->put(index + VERT_ATTRIB_GENERIC0, name);
139 struct gl_shader_program *const shProg =
141 bind_attrib_location(ctx, shProg, index, name, true);
150 struct gl_shader_program *const shProg =
152 if (!shProg)
155 bind_attrib_location(ctx, shProg, index, name, false);
164 struct gl_shader_program *shProg;
171 shProg = _mesa_lookup_shader_program_err(ctx, program, "glGetActiveAttrib");
172 if (!shProg)
175 if (!shProg->data->LinkStatus) {
181 if (shProg->_LinkedShaders[MESA_SHADER_VERTEX] == NULL) {
187 _mesa_program_resource_find_index(shProg, GL_PROGRAM_INPUT,
203 _mesa_program_resource_prop(shProg, res, desired_index, GL_ARRAY_SIZE,
207 _mesa_program_resource_prop(shProg, res, desired_index, GL_TYPE,
215 struct gl_shader_program *const shProg =
218 if (!shProg) {
222 if (!shProg->data->LinkStatus) {
233 if (shProg->_LinkedShaders[MESA_SHADER_VERTEX] == NULL)
238 _mesa_program_resource_find_name(shProg, GL_PROGRAM_INPUT, name,
248 _mesa_count_active_attribs(struct gl_shader_program *shProg)
250 if (!shProg->data->LinkStatus
251 || shProg->_LinkedShaders[MESA_SHADER_VERTEX] == NULL) {
255 struct gl_program_resource *res = shProg->data->ProgramResourceList;
257 for (unsigned j = 0; j < shProg->data->NumProgramResourceList;
268 _mesa_longest_attribute_name_length(struct gl_shader_program *shProg)
270 if (!shProg->data->LinkStatus
271 || shProg->_LinkedShaders[MESA_SHADER_VERTEX] == NULL) {
275 struct gl_program_resource *res = shProg->data->ProgramResourceList;
277 for (unsigned j = 0; j < shProg->data->NumProgramResourceList;
301 bind_frag_data_location(struct gl_shader_program *const shProg,
309 shProg->FragDataBindings->put(colorNumber + FRAG_RESULT_DATA0, name);
310 shProg->FragDataIndexBindings->put(index, name);
334 struct gl_shader_program *const shProg =
337 bind_frag_data_location(shProg, name, colorNumber, 0);
346 struct gl_shader_program *const shProg =
348 if (!shProg)
374 bind_frag_data_location(shProg, name, colorNumber, index);
386 struct gl_shader_program *const shProg =
389 bind_frag_data_location(shProg, name, colorNumber, index);
396 struct gl_shader_program *const shProg =
399 if (!shProg) {
403 if (!shProg->data->LinkStatus) {
414 if (shProg->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL)
417 return _mesa_program_resource_location_index(shProg, GL_PROGRAM_OUTPUT,
425 struct gl_shader_program *const shProg =
428 if (!shProg) {
432 if (!shProg->data->LinkStatus) {
443 if (shProg->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL)
448 _mesa_program_resource_find_name(shProg, GL_PROGRAM_OUTPUT, name,
560 search_resource_hash(struct gl_shader_program *shProg,
581 _mesa_hash_table_u64_search(shProg->data->ProgramResourceHash, key);
595 _mesa_program_resource_find_name(struct gl_shader_program *shProg,
605 if (shProg->data->ProgramResourceHash)
606 res = search_resource_hash(shProg, programInterface, name, array_index);
611 res = shProg->data->ProgramResourceList;
612 for (unsigned i = 0; i < shProg->data->NumProgramResourceList; i++, res++) {
720 program_resource_find_binding_offset(struct gl_shader_program *shProg,
743 struct gl_program_resource *res = shProg->data->ProgramResourceList;
750 for (unsigned i = 0; i < shProg->data->NumProgramResourceList; i++, res++) {
777 res = shProg->data->ProgramResourceList;
778 for (unsigned i = 0; i < shProg->data->NumProgramResourceList; i++, res++) {
802 _mesa_program_resource_find_active_variable(struct gl_shader_program *shProg,
814 res = _mesa_program_resource_find_name(shProg, programInterface, uni.IndexName,
820 res = program_resource_find_binding_offset(shProg, programInterface,
828 calc_resource_index(struct gl_shader_program *shProg,
833 for (i = 0; i < shProg->data->NumProgramResourceList; i++) {
834 if (&shProg->data->ProgramResourceList[i] == res)
836 if (shProg->data->ProgramResourceList[i].Type == res->Type)
846 _mesa_program_resource_index(struct gl_shader_program *shProg,
854 return RESOURCE_ATC(res) - shProg->data->AtomicBuffers;
867 return calc_resource_index(shProg, res);
875 program_resource_find_data(struct gl_shader_program *shProg, void *data)
877 struct gl_program_resource *res = shProg->data->ProgramResourceList;
878 for (unsigned i = 0; i < shProg->data->NumProgramResourceList;
889 _mesa_program_resource_find_index(struct gl_shader_program *shProg,
892 struct gl_program_resource *res = shProg->data->ProgramResourceList;
895 for (unsigned i = 0; i < shProg->data->NumProgramResourceList;
905 if (_mesa_program_resource_index(shProg, res) == index)
984 _mesa_get_program_resource_name(struct gl_shader_program *shProg,
994 _mesa_program_resource_find_index(shProg, programInterface, index);
1115 _mesa_program_resource_location(struct gl_shader_program *shProg,
1120 _mesa_program_resource_find_name(shProg, programInterface, name,
1152 _mesa_program_resource_location_index(struct gl_shader_program *shProg,
1156 _mesa_program_resource_find_name(shProg, programInterface, name, NULL);
1188 is_resource_referenced(struct gl_shader_program *shProg,
1193 if (!shProg->_LinkedShaders[stage])
1200 return shProg->data->UniformBlocks[index].stageref & (1 << stage);
1203 return shProg->data->ShaderStorageBlocks[index].stageref & (1 << stage);
1209 get_buffer_property(struct gl_shader_program *shProg,
1233 shProg,
1248 shProg,
1256 _mesa_program_resource_index(shProg, uni);
1275 shProg,
1290 shProg,
1298 _mesa_program_resource_index(shProg, uni);
1323 program_resource_find_data(shProg,
1324 &shProg->data->UniformStorage[idx]);
1326 *val++ = _mesa_program_resource_index(shProg, uni);
1340 shProg->last_vert_prog->sh.LinkedTransformFeedback;
1344 _mesa_program_resource_find_index(shProg,
1367 _mesa_program_resource_prop(struct gl_shader_program *shProg,
1478 return get_buffer_property(shProg, res, prop, val, glthread, caller);
1496 *val = is_resource_referenced(shProg, res, index,
1563 p = shProg->_LinkedShaders[_mesa_shader_stage_from_subroutine_uniform(res->Type)]->Program;
1630 _mesa_get_program_resourceiv(struct gl_shader_program *shProg,
1641 _mesa_program_resource_find_index(shProg, programInterface, index);
1654 _mesa_program_resource_prop(shProg, res, index, *prop, val,
1672 _mesa_get_program_interfaceiv(struct gl_shader_program *shProg,
1682 for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++)
1683 if (shProg->data->ProgramResourceList[i].Type == programInterface)
1698 for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
1699 if (shProg->data->ProgramResourceList[i].Type != programInterface)
1702 _mesa_program_resource_name_len(&shProg->data->ProgramResourceList[i]);
1709 for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
1710 if (shProg->data->ProgramResourceList[i].Type == programInterface) {
1713 shProg->data->ProgramResourceList[i].Data;
1719 for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
1720 if (shProg->data->ProgramResourceList[i].Type == programInterface) {
1723 shProg->data->ProgramResourceList[i].Data;
1728 shProg,
1741 for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
1742 if (shProg->data->ProgramResourceList[i].Type == programInterface) {
1745 shProg->data->ProgramResourceList[i].Data;
1751 for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
1752 if (shProg->data->ProgramResourceList[i].Type == programInterface) {
1755 shProg->data->ProgramResourceList[i].Data;
1775 for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
1776 if (shProg->data->ProgramResourceList[i].Type == programInterface) {
1779 shProg->data->ProgramResourceList[i].Data;
2067 _mesa_create_program_resource_hash(struct gl_shader_program *shProg)
2070 if (shProg->data->ProgramResourceHash)
2071 _mesa_hash_table_u64_destroy(shProg->data->ProgramResourceHash);
2073 shProg->data->ProgramResourceHash = _mesa_hash_table_u64_create(shProg);
2075 struct gl_program_resource *res = shProg->data->ProgramResourceList;
2076 for (unsigned i = 0; i < shProg->data->NumProgramResourceList; i++, res++) {
2080 _mesa_hash_table_u64_insert(shProg->data->ProgramResourceHash, key,