Lines Matching refs:shProg
103 struct gl_shader_program *const shProg, GLuint index,
127 shProg->AttributeBindings->put(index + VERT_ATTRIB_GENERIC0, name);
141 struct gl_shader_program *const shProg =
143 bind_attrib_location(ctx, shProg, index, name, true);
152 struct gl_shader_program *const shProg =
154 if (!shProg)
157 bind_attrib_location(ctx, shProg, index, name, false);
166 struct gl_shader_program *shProg;
173 shProg = _mesa_lookup_shader_program_err(ctx, program, "glGetActiveAttrib");
174 if (!shProg)
177 if (!shProg->data->LinkStatus) {
183 if (shProg->_LinkedShaders[MESA_SHADER_VERTEX] == NULL) {
189 _mesa_program_resource_find_index(shProg, GL_PROGRAM_INPUT,
205 _mesa_program_resource_prop(shProg, res, desired_index, GL_ARRAY_SIZE,
209 _mesa_program_resource_prop(shProg, res, desired_index, GL_TYPE,
217 struct gl_shader_program *const shProg =
220 if (!shProg) {
224 if (!shProg->data->LinkStatus) {
235 if (shProg->_LinkedShaders[MESA_SHADER_VERTEX] == NULL)
240 _mesa_program_resource_find_name(shProg, GL_PROGRAM_INPUT, name,
250 _mesa_count_active_attribs(struct gl_shader_program *shProg)
252 if (!shProg->data->LinkStatus
253 || shProg->_LinkedShaders[MESA_SHADER_VERTEX] == NULL) {
257 struct gl_program_resource *res = shProg->data->ProgramResourceList;
259 for (unsigned j = 0; j < shProg->data->NumProgramResourceList;
270 _mesa_longest_attribute_name_length(struct gl_shader_program *shProg)
272 if (!shProg->data->LinkStatus
273 || shProg->_LinkedShaders[MESA_SHADER_VERTEX] == NULL) {
277 struct gl_program_resource *res = shProg->data->ProgramResourceList;
279 for (unsigned j = 0; j < shProg->data->NumProgramResourceList;
302 bind_frag_data_location(struct gl_shader_program *const shProg,
310 shProg->FragDataBindings->put(colorNumber + FRAG_RESULT_DATA0, name);
311 shProg->FragDataIndexBindings->put(index, name);
335 struct gl_shader_program *const shProg =
338 bind_frag_data_location(shProg, name, colorNumber, 0);
347 struct gl_shader_program *const shProg =
349 if (!shProg)
375 bind_frag_data_location(shProg, name, colorNumber, index);
387 struct gl_shader_program *const shProg =
390 bind_frag_data_location(shProg, name, colorNumber, index);
397 struct gl_shader_program *const shProg =
400 if (!shProg) {
404 if (!shProg->data->LinkStatus) {
415 if (shProg->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL)
418 return _mesa_program_resource_location_index(shProg, GL_PROGRAM_OUTPUT,
426 struct gl_shader_program *const shProg =
429 if (!shProg) {
433 if (!shProg->data->LinkStatus) {
444 if (shProg->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL)
449 _mesa_program_resource_find_name(shProg, GL_PROGRAM_OUTPUT, name,
633 search_resource_hash(struct gl_shader_program *shProg,
638 assert(type < ARRAY_SIZE(shProg->data->ProgramResourceHash));
640 if (!shProg->data->ProgramResourceHash[type])
659 _mesa_hash_table_search_pre_hashed(shProg->data->ProgramResourceHash[type],
673 _mesa_program_resource_find_name(struct gl_shader_program *shProg,
684 search_resource_hash(shProg, programInterface, name, len, array_index);
689 res = shProg->data->ProgramResourceList;
690 for (unsigned i = 0; i < shProg->data->NumProgramResourceList; i++, res++) {
792 program_resource_find_binding_offset(struct gl_shader_program *shProg,
815 struct gl_program_resource *res = shProg->data->ProgramResourceList;
822 for (unsigned i = 0; i < shProg->data->NumProgramResourceList; i++, res++) {
849 res = shProg->data->ProgramResourceList;
850 for (unsigned i = 0; i < shProg->data->NumProgramResourceList; i++, res++) {
874 _mesa_program_resource_find_active_variable(struct gl_shader_program *shProg,
886 res = _mesa_program_resource_find_name(shProg, programInterface, uni.IndexName,
892 res = program_resource_find_binding_offset(shProg, programInterface,
900 calc_resource_index(struct gl_shader_program *shProg,
905 for (i = 0; i < shProg->data->NumProgramResourceList; i++) {
906 if (&shProg->data->ProgramResourceList[i] == res)
908 if (shProg->data->ProgramResourceList[i].Type == res->Type)
918 _mesa_program_resource_index(struct gl_shader_program *shProg,
926 return RESOURCE_ATC(res) - shProg->data->AtomicBuffers;
939 return calc_resource_index(shProg, res);
947 program_resource_find_data(struct gl_shader_program *shProg, void *data)
949 struct gl_program_resource *res = shProg->data->ProgramResourceList;
950 for (unsigned i = 0; i < shProg->data->NumProgramResourceList;
961 _mesa_program_resource_find_index(struct gl_shader_program *shProg,
964 struct gl_program_resource *res = shProg->data->ProgramResourceList;
967 for (unsigned i = 0; i < shProg->data->NumProgramResourceList;
977 if (_mesa_program_resource_index(shProg, res) == index)
1055 _mesa_get_program_resource_name(struct gl_shader_program *shProg,
1065 _mesa_program_resource_find_index(shProg, programInterface, index);
1186 _mesa_program_resource_location(struct gl_shader_program *shProg,
1191 _mesa_program_resource_find_name(shProg, programInterface, name,
1223 _mesa_program_resource_location_index(struct gl_shader_program *shProg,
1227 _mesa_program_resource_find_name(shProg, programInterface, name, NULL);
1259 is_resource_referenced(struct gl_shader_program *shProg,
1264 if (!shProg->_LinkedShaders[stage])
1271 return shProg->data->UniformBlocks[index].stageref & (1 << stage);
1274 return shProg->data->ShaderStorageBlocks[index].stageref & (1 << stage);
1280 get_buffer_property(struct gl_shader_program *shProg,
1304 shProg,
1319 shProg,
1327 _mesa_program_resource_index(shProg, uni);
1346 shProg,
1361 shProg,
1369 _mesa_program_resource_index(shProg, uni);
1394 program_resource_find_data(shProg,
1395 &shProg->data->UniformStorage[idx]);
1397 *val++ = _mesa_program_resource_index(shProg, uni);
1411 shProg->last_vert_prog->sh.LinkedTransformFeedback;
1415 _mesa_program_resource_find_index(shProg,
1438 _mesa_program_resource_prop(struct gl_shader_program *shProg,
1549 return get_buffer_property(shProg, res, prop, val, glthread, caller);
1567 *val = is_resource_referenced(shProg, res, index,
1634 p = shProg->_LinkedShaders[_mesa_shader_stage_from_subroutine_uniform(res->Type)]->Program;
1701 _mesa_get_program_resourceiv(struct gl_shader_program *shProg,
1712 _mesa_program_resource_find_index(shProg, programInterface, index);
1725 _mesa_program_resource_prop(shProg, res, index, *prop, val,
1743 _mesa_get_program_interfaceiv(struct gl_shader_program *shProg,
1753 for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++)
1754 if (shProg->data->ProgramResourceList[i].Type == programInterface)
1769 for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
1770 if (shProg->data->ProgramResourceList[i].Type != programInterface)
1773 _mesa_program_resource_name_length_array(&shProg->data->ProgramResourceList[i]);
1780 for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
1781 if (shProg->data->ProgramResourceList[i].Type == programInterface) {
1784 shProg->data->ProgramResourceList[i].Data;
1790 for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
1791 if (shProg->data->ProgramResourceList[i].Type == programInterface) {
1794 shProg->data->ProgramResourceList[i].Data;
1799 shProg,
1812 for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
1813 if (shProg->data->ProgramResourceList[i].Type == programInterface) {
1816 shProg->data->ProgramResourceList[i].Data;
1822 for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
1823 if (shProg->data->ProgramResourceList[i].Type == programInterface) {
1826 shProg->data->ProgramResourceList[i].Data;
1846 for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
1847 if (shProg->data->ProgramResourceList[i].Type == programInterface) {
1850 shProg->data->ProgramResourceList[i].Data;
2138 _mesa_program_resource_hash_destroy(struct gl_shader_program *shProg)
2140 for (unsigned i = 0; i < ARRAY_SIZE(shProg->data->ProgramResourceHash); i++) {
2141 if (shProg->data->ProgramResourceHash[i]) {
2142 _mesa_hash_table_destroy(shProg->data->ProgramResourceHash[i], NULL);
2143 shProg->data->ProgramResourceHash[i] = NULL;
2149 _mesa_create_program_resource_hash(struct gl_shader_program *shProg)
2152 _mesa_program_resource_hash_destroy(shProg);
2154 struct gl_program_resource *res = shProg->data->ProgramResourceList;
2155 for (unsigned i = 0; i < shProg->data->NumProgramResourceList; i++, res++) {
2159 assert(type < ARRAY_SIZE(shProg->data->ProgramResourceHash));
2161 if (!shProg->data->ProgramResourceHash[type]) {
2162 shProg->data->ProgramResourceHash[type] =
2163 _mesa_hash_table_create(shProg, _mesa_hash_string,
2167 _mesa_hash_table_insert(shProg->data->ProgramResourceHash[type],