From: Marek Olšák Date: Wed, 16 Oct 2019 20:19:09 +0000 (-0400) Subject: st/mesa: remove st_vp_variant_key in favor of st_common_variant_key X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c74e354d10b3a7640f682a43ca0984bc93fa3ef;p=mesa.git st/mesa: remove st_vp_variant_key in favor of st_common_variant_key Reviewed-by: Timothy Arceri --- diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c index 9187bac8778..751c9441b20 100644 --- a/src/mesa/state_tracker/st_atom_shader.c +++ b/src/mesa/state_tracker/st_atom_shader.c @@ -190,7 +190,7 @@ st_update_vp( struct st_context *st ) stvp->variants->key.passthrough_edgeflags == st->vertdata_edgeflags) { st->vp_variant = stvp->variants; } else { - struct st_vp_variant_key key; + struct st_common_variant_key key; memset(&key, 0, sizeof(key)); diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index c6c63f90a28..b06aa7fc065 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -643,7 +643,7 @@ static const gl_state_index16 depth_range_state[STATE_LENGTH] = static struct st_vp_variant * st_create_vp_variant(struct st_context *st, struct st_vertex_program *stvp, - const struct st_vp_variant_key *key) + const struct st_common_variant_key *key) { struct st_vp_variant *vpv = CALLOC_STRUCT(st_vp_variant); struct pipe_context *pipe = st->pipe; @@ -761,7 +761,7 @@ st_create_vp_variant(struct st_context *st, struct st_vp_variant * st_get_vp_variant(struct st_context *st, struct st_vertex_program *stvp, - const struct st_vp_variant_key *key) + const struct st_common_variant_key *key) { struct st_vp_variant *vpv; @@ -1958,7 +1958,7 @@ st_precompile_shader_variant(struct st_context *st, switch (prog->Target) { case GL_VERTEX_PROGRAM_ARB: { struct st_vertex_program *p = (struct st_vertex_program *)prog; - struct st_vp_variant_key key; + struct st_common_variant_key key; memset(&key, 0, sizeof(key)); diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h index 8c86453ed49..1940a4f0434 100644 --- a/src/mesa/state_tracker/st_program.h +++ b/src/mesa/state_tracker/st_program.h @@ -180,9 +180,8 @@ struct st_fragment_program }; - -/** Vertex program variant key */ -struct st_vp_variant_key +/** Shader key shared by other shaders */ +struct st_common_variant_key { struct st_context *st; /**< variants are per-context */ bool passthrough_edgeflags; @@ -211,7 +210,7 @@ struct st_vp_variant /* Parameters which generated this translated version of a vertex * shader: */ - struct st_vp_variant_key key; + struct st_common_variant_key key; /** * The shader variant saved for the draw module to later emulate @@ -267,22 +266,6 @@ struct st_vertex_program }; - -/** Shader key shared by other shaders */ -struct st_common_variant_key -{ - struct st_context *st; /**< variants are per-context */ - - /** For compat profile */ - bool clamp_color; - - /** both for ARB_depth_clamp */ - bool lower_depth_clamp; - bool clip_negative_one_to_one; - -}; - - /** * Geometry program variant. */ @@ -392,7 +375,7 @@ st_set_prog_affected_state_flags(struct gl_program *prog); extern struct st_vp_variant * st_get_vp_variant(struct st_context *st, struct st_vertex_program *stvp, - const struct st_vp_variant_key *key); + const struct st_common_variant_key *key); extern struct st_fp_variant *