From bb6e851a1e52599e346112837b93686a90817901 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sun, 30 Apr 2017 16:05:42 +0200 Subject: st/mesa: unify TCS, TES, GS st_*_program structures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tested-by: Edmondo Tommasina Reviewed-by: Brian Paul Reviewed-by: Nicolai Hähnle --- src/mesa/state_tracker/st_program.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/mesa/state_tracker/st_program.c') diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index d9b1d12434e..09e6696782f 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -120,7 +120,7 @@ st_set_prog_affected_state_flags(struct gl_program *prog) break; case MESA_SHADER_TESS_CTRL: - states = &((struct st_tessctrl_program*)prog)->affected_states; + states = &((struct st_common_program*)prog)->affected_states; *states = ST_NEW_TCS_STATE; @@ -135,7 +135,7 @@ st_set_prog_affected_state_flags(struct gl_program *prog) break; case MESA_SHADER_TESS_EVAL: - states = &((struct st_tesseval_program*)prog)->affected_states; + states = &((struct st_common_program*)prog)->affected_states; *states = ST_NEW_TES_STATE | ST_NEW_RASTERIZER; @@ -151,7 +151,7 @@ st_set_prog_affected_state_flags(struct gl_program *prog) break; case MESA_SHADER_GEOMETRY: - states = &((struct st_geometry_program*)prog)->affected_states; + states = &((struct st_common_program*)prog)->affected_states; *states = ST_NEW_GS_STATE | ST_NEW_RASTERIZER; @@ -1630,7 +1630,7 @@ st_translate_program_common(struct st_context *st, */ bool st_translate_geometry_program(struct st_context *st, - struct st_geometry_program *stgp) + struct st_common_program *stgp) { struct ureg_program *ureg; @@ -1717,7 +1717,7 @@ st_get_basic_variant(struct st_context *st, */ bool st_translate_tessctrl_program(struct st_context *st, - struct st_tessctrl_program *sttcp) + struct st_common_program *sttcp) { struct ureg_program *ureg; @@ -1742,7 +1742,7 @@ st_translate_tessctrl_program(struct st_context *st, */ bool st_translate_tesseval_program(struct st_context *st, - struct st_tesseval_program *sttep) + struct st_common_program *sttep) { struct ureg_program *ureg; @@ -1918,9 +1918,9 @@ destroy_program_variants(struct st_context *st, struct gl_program *target) case GL_TESS_EVALUATION_PROGRAM_NV: case GL_COMPUTE_PROGRAM_NV: { - struct st_geometry_program *gp = (struct st_geometry_program*)target; - struct st_tessctrl_program *tcp = (struct st_tessctrl_program*)target; - struct st_tesseval_program *tep = (struct st_tesseval_program*)target; + struct st_common_program *gp = (struct st_common_program*)target; + struct st_common_program *tcp = (struct st_common_program*)target; + struct st_common_program *tep = (struct st_common_program*)target; struct st_compute_program *cp = (struct st_compute_program*)target; struct st_basic_variant **variants = target->Target == GL_GEOMETRY_PROGRAM_NV ? &gp->variants : @@ -2066,19 +2066,19 @@ st_precompile_shader_variant(struct st_context *st, } case GL_TESS_CONTROL_PROGRAM_NV: { - struct st_tessctrl_program *p = (struct st_tessctrl_program *)prog; + struct st_common_program *p = (struct st_common_program *)prog; st_get_basic_variant(st, PIPE_SHADER_TESS_CTRL, &p->tgsi, &p->variants); break; } case GL_TESS_EVALUATION_PROGRAM_NV: { - struct st_tesseval_program *p = (struct st_tesseval_program *)prog; + struct st_common_program *p = (struct st_common_program *)prog; st_get_basic_variant(st, PIPE_SHADER_TESS_EVAL, &p->tgsi, &p->variants); break; } case GL_GEOMETRY_PROGRAM_NV: { - struct st_geometry_program *p = (struct st_geometry_program *)prog; + struct st_common_program *p = (struct st_common_program *)prog; st_get_basic_variant(st, PIPE_SHADER_GEOMETRY, &p->tgsi, &p->variants); break; } -- cgit v1.2.3