void opengl_si_shader_list_done(void) { int index; struct opengl_si_shader_t *shdr; /* Not initialized */ if (!opengl_si_shader_list) return; /* Free list of Southern Islands programs */ LIST_FOR_EACH(opengl_si_shader_list, index) { shdr = list_get(opengl_si_shader_list, index); if (shdr) opengl_si_shader_free(shdr); }
static int opengl_abi_si_shader_free_impl(X86Context *ctx) { struct x86_regs_t *regs = ctx->regs; struct opengl_si_shader_t *shdr; unsigned int shader_id; /* Arguments */ shader_id = regs->ecx; opengl_debug("\tshader_id=%d\n", shader_id); /* Get and free */ shdr = list_get(opengl_si_shader_list, shader_id); if (shdr) opengl_si_shader_free(shdr); return 0; }