st/mesa: remove st_vp_variant_key in favor of st_common_variant_key

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
Marek Olšák 2019-10-16 16:19:09 -04:00
parent 6468df0533
commit 0c74e354d1
3 changed files with 8 additions and 25 deletions

View File

@ -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));

View File

@ -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));

View File

@ -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 *