From 90018dbbe04b9341518a2b6e91f8786cd00244c1 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 14 Apr 2016 01:18:27 +0200 Subject: [PATCH] (Cg) Cleanups --- gfx/drivers_shader/shader_gl_cg.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gfx/drivers_shader/shader_gl_cg.c b/gfx/drivers_shader/shader_gl_cg.c index f89773bfa2..2f8f4e4ff4 100644 --- a/gfx/drivers_shader/shader_gl_cg.c +++ b/gfx/drivers_shader/shader_gl_cg.c @@ -333,15 +333,16 @@ static void gl_cg_set_params(void *data, void *shader_data, unsigned i; struct uniform_info uniform_params[10]; CGparameter uniform_data[10]; - unsigned uniform_count = 0; - const struct gfx_tex_info *info = (const struct gfx_tex_info*)_info; - const struct gfx_tex_info *prev_info = (const struct gfx_tex_info*)_prev_info; + unsigned uniform_count = 0; + const struct gfx_tex_info *info = (const struct gfx_tex_info*)_info; + const struct gfx_tex_info *prev_info = (const struct gfx_tex_info*)_prev_info; const struct gfx_tex_info *feedback_info = (const struct gfx_tex_info*)_feedback_info; - const struct gfx_tex_info *fbo_info = (const struct gfx_tex_info*)_fbo_info; - cg_shader_data_t *cg_data = (cg_shader_data_t*)shader_data; + const struct gfx_tex_info *fbo_info = (const struct gfx_tex_info*)_fbo_info; + cg_shader_data_t *cg_data = (cg_shader_data_t*)shader_data; - if (!cg_data || (cg_data->active_idx == 0) || - (cg_data->active_idx == GL_SHADER_STOCK_BLEND)) + if (!cg_data || (cg_data->active_idx == 0)) + return; + if (cg_data->active_idx == GL_SHADER_STOCK_BLEND) return; /* Set frame. */