aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_program.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-01-30 15:10:11 +0100
committerMarek Olšák <[email protected]>2016-02-09 21:19:50 +0100
commitb8d31fdedfa3b2f060b42e7145771c5325340733 (patch)
treee13b36dc15c10dbe639914f1464b16c1ec7a22d7 /src/mesa/state_tracker/st_cb_program.c
parentfe14110f359b0665cb0c09aa14f13a5ebb33b1bc (diff)
st/mesa: unify variants and delete functions for TCS, TES, GS
no difference between those Reviewed-by: Edward O'Callaghan <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_program.c')
-rw-r--r--src/mesa/state_tracker/st_cb_program.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c
index 2c4eccf1e06..6f9c53efc40 100644
--- a/src/mesa/state_tracker/st_cb_program.c
+++ b/src/mesa/state_tracker/st_cb_program.c
@@ -153,7 +153,8 @@ st_delete_program(struct gl_context *ctx, struct gl_program *prog)
struct st_geometry_program *stgp =
(struct st_geometry_program *) prog;
- st_release_gp_variants(st, stgp);
+ st_release_basic_variants(st, stgp->Base.Base.Target,
+ &stgp->variants, &stgp->tgsi);
if (stgp->glsl_to_tgsi)
free_glsl_to_tgsi_visitor(stgp->glsl_to_tgsi);
@@ -175,7 +176,8 @@ st_delete_program(struct gl_context *ctx, struct gl_program *prog)
struct st_tessctrl_program *sttcp =
(struct st_tessctrl_program *) prog;
- st_release_tcp_variants(st, sttcp);
+ st_release_basic_variants(st, sttcp->Base.Base.Target,
+ &sttcp->variants, &sttcp->tgsi);
if (sttcp->glsl_to_tgsi)
free_glsl_to_tgsi_visitor(sttcp->glsl_to_tgsi);
@@ -186,7 +188,8 @@ st_delete_program(struct gl_context *ctx, struct gl_program *prog)
struct st_tesseval_program *sttep =
(struct st_tesseval_program *) prog;
- st_release_tep_variants(st, sttep);
+ st_release_basic_variants(st, sttep->Base.Base.Target,
+ &sttep->variants, &sttep->tgsi);
if (sttep->glsl_to_tgsi)
free_glsl_to_tgsi_visitor(sttep->glsl_to_tgsi);
@@ -239,7 +242,8 @@ st_program_string_notify( struct gl_context *ctx,
else if (target == GL_GEOMETRY_PROGRAM_NV) {
struct st_geometry_program *stgp = (struct st_geometry_program *) prog;
- st_release_gp_variants(st, stgp);
+ st_release_basic_variants(st, stgp->Base.Base.Target,
+ &stgp->variants, &stgp->tgsi);
if (!st_translate_geometry_program(st, stgp))
return false;
@@ -260,7 +264,8 @@ st_program_string_notify( struct gl_context *ctx,
struct st_tessctrl_program *sttcp =
(struct st_tessctrl_program *) prog;
- st_release_tcp_variants(st, sttcp);
+ st_release_basic_variants(st, sttcp->Base.Base.Target,
+ &sttcp->variants, &sttcp->tgsi);
if (!st_translate_tessctrl_program(st, sttcp))
return false;
@@ -271,7 +276,8 @@ st_program_string_notify( struct gl_context *ctx,
struct st_tesseval_program *sttep =
(struct st_tesseval_program *) prog;
- st_release_tep_variants(st, sttep);
+ st_release_basic_variants(st, sttep->Base.Base.Target,
+ &sttep->variants, &sttep->tgsi);
if (!st_translate_tesseval_program(st, sttep))
return false;