interstage_cross_validate_uniform_blocks(struct gl_shader_program *prog,
bool validate_ssbo)
{
- int *InterfaceBlockStageIndex[MESA_SHADER_STAGES];
+ int *ifc_blk_stage_idx[MESA_SHADER_STAGES];
struct gl_uniform_block *blks = NULL;
unsigned *num_blks = validate_ssbo ? &prog->data->NumShaderStorageBlocks :
&prog->data->NumUniformBlocks;
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
struct gl_linked_shader *sh = prog->_LinkedShaders[i];
- InterfaceBlockStageIndex[i] = new int[max_num_buffer_blocks];
+ ifc_blk_stage_idx[i] =
+ (int *) malloc(sizeof(int) * max_num_buffer_blocks);
for (unsigned int j = 0; j < max_num_buffer_blocks; j++)
- InterfaceBlockStageIndex[i][j] = -1;
+ ifc_blk_stage_idx[i][j] = -1;
if (sh == NULL)
continue;
"definitions\n", sh_blks[j]->Name);
for (unsigned k = 0; k <= i; k++) {
- delete[] InterfaceBlockStageIndex[k];
+ free(ifc_blk_stage_idx[k]);
}
/* Reset the block count. This will help avoid various segfaults
return false;
}
- InterfaceBlockStageIndex[i][index] = j;
+ ifc_blk_stage_idx[i][index] = j;
}
}
*/
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
for (unsigned j = 0; j < *num_blks; j++) {
- int stage_index = InterfaceBlockStageIndex[i][j];
+ int stage_index = ifc_blk_stage_idx[i][j];
if (stage_index != -1) {
struct gl_linked_shader *sh = prog->_LinkedShaders[i];
}
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
- delete[] InterfaceBlockStageIndex[i];
+ free(ifc_blk_stage_idx[i]);
}
if (validate_ssbo)