diff options
author | Marek Olšák <[email protected]> | 2016-01-30 15:10:11 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-02-09 21:19:50 +0100 |
commit | b8d31fdedfa3b2f060b42e7145771c5325340733 (patch) | |
tree | e13b36dc15c10dbe639914f1464b16c1ec7a22d7 /src/mesa/state_tracker/st_program.h | |
parent | fe14110f359b0665cb0c09aa14f13a5ebb33b1bc (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_program.h')
-rw-r--r-- | src/mesa/state_tracker/st_program.h | 88 |
1 files changed, 17 insertions, 71 deletions
diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h index a74531581b4..80d6f81d267 100644 --- a/src/mesa/state_tracker/st_program.h +++ b/src/mesa/state_tracker/st_program.h @@ -171,25 +171,24 @@ struct st_vertex_program -/** Geometry program variant key */ -struct st_gp_variant_key +/** Key shared by all shaders except VP, FP */ +struct st_basic_variant_key { struct st_context *st; /**< variants are per-context */ - /* no other fields yet */ }; /** * Geometry program variant. */ -struct st_gp_variant +struct st_basic_variant { /* Parameters which generated this variant. */ - struct st_gp_variant_key key; + struct st_basic_variant_key key; void *driver_shader; - struct st_gp_variant *next; + struct st_basic_variant *next; }; @@ -202,30 +201,7 @@ struct st_geometry_program struct pipe_shader_state tgsi; struct glsl_to_tgsi_visitor* glsl_to_tgsi; - struct st_gp_variant *variants; -}; - - - -/** Tessellation control program variant key */ -struct st_tcp_variant_key -{ - struct st_context *st; /**< variants are per-context */ - /* no other fields yet */ -}; - - -/** - * Tessellation control program variant. - */ -struct st_tcp_variant -{ - /* Parameters which generated this variant. */ - struct st_tcp_variant_key key; - - void *driver_shader; - - struct st_tcp_variant *next; + struct st_basic_variant *variants; }; @@ -238,30 +214,7 @@ struct st_tessctrl_program struct pipe_shader_state tgsi; struct glsl_to_tgsi_visitor* glsl_to_tgsi; - struct st_tcp_variant *variants; -}; - - - -/** Tessellation evaluation program variant key */ -struct st_tep_variant_key -{ - struct st_context *st; /**< variants are per-context */ - /* no other fields yet */ -}; - - -/** - * Tessellation evaluation program variant. - */ -struct st_tep_variant -{ - /* Parameters which generated this variant. */ - struct st_tep_variant_key key; - - void *driver_shader; - - struct st_tep_variant *next; + struct st_basic_variant *variants; }; @@ -274,7 +227,7 @@ struct st_tesseval_program struct pipe_shader_state tgsi; struct glsl_to_tgsi_visitor* glsl_to_tgsi; - struct st_tep_variant *variants; + struct st_basic_variant *variants; }; @@ -398,20 +351,20 @@ st_get_fp_variant(struct st_context *st, const struct st_fp_variant_key *key); -extern struct st_gp_variant * +extern struct st_basic_variant * st_get_gp_variant(struct st_context *st, struct st_geometry_program *stgp, - const struct st_gp_variant_key *key); + const struct st_basic_variant_key *key); -extern struct st_tcp_variant * +extern struct st_basic_variant * st_get_tcp_variant(struct st_context *st, struct st_tessctrl_program *sttcp, - const struct st_tcp_variant_key *key); + const struct st_basic_variant_key *key); -extern struct st_tep_variant * +extern struct st_basic_variant * st_get_tep_variant(struct st_context *st, struct st_tesseval_program *sttep, - const struct st_tep_variant_key *key); + const struct st_basic_variant_key *key); extern void st_release_vp_variants( struct st_context *st, @@ -422,16 +375,9 @@ st_release_fp_variants( struct st_context *st, struct st_fragment_program *stfp ); extern void -st_release_gp_variants(struct st_context *st, - struct st_geometry_program *stgp); - -extern void -st_release_tcp_variants(struct st_context *st, - struct st_tessctrl_program *sttcp); - -extern void -st_release_tep_variants(struct st_context *st, - struct st_tesseval_program *sttep); +st_release_basic_variants(struct st_context *st, GLenum target, + struct st_basic_variant **variants, + struct pipe_shader_state *tgsi); extern void st_destroy_program_variants(struct st_context *st); |