st/mesa: remove st_vp_variant::num_inputs
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -568,7 +568,7 @@ st_update_array(struct st_context *st)
|
||||
st_setup_current(st, vp, vp_variant, velements, vbuffer, &num_vbuffers);
|
||||
|
||||
/* Set the array into cso */
|
||||
num_velements = vp_variant->num_inputs;
|
||||
num_velements = vp->num_inputs + vp_variant->key.passthrough_edgeflags;
|
||||
set_vertex_attribs(st, vbuffer, num_vbuffers, velements, num_velements);
|
||||
|
||||
/* Unreference uploaded buffer resources. */
|
||||
|
@@ -583,7 +583,6 @@ st_create_vp_variant(struct st_context *st,
|
||||
struct gl_program_parameter_list *params = stvp->Base.Parameters;
|
||||
|
||||
vpv->key = *key;
|
||||
vpv->num_inputs = ((struct st_vertex_program*)stvp)->num_inputs;
|
||||
|
||||
state.stream_output = stvp->state.stream_output;
|
||||
|
||||
@@ -598,7 +597,6 @@ st_create_vp_variant(struct st_context *st,
|
||||
}
|
||||
if (key->passthrough_edgeflags) {
|
||||
NIR_PASS_V(state.ir.nir, nir_lower_passthrough_edgeflags);
|
||||
vpv->num_inputs++;
|
||||
finalize = true;
|
||||
}
|
||||
|
||||
@@ -670,11 +668,9 @@ st_create_vp_variant(struct st_context *st,
|
||||
if (tokens) {
|
||||
tgsi_free_tokens(state.tokens);
|
||||
state.tokens = tokens;
|
||||
|
||||
if (key->passthrough_edgeflags)
|
||||
vpv->num_inputs++;
|
||||
} else
|
||||
} else {
|
||||
fprintf(stderr, "mesa: cannot emulate deprecated features\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (key->lower_depth_clamp) {
|
||||
@@ -726,7 +722,8 @@ st_get_vp_variant(struct st_context *st,
|
||||
if (vpv) {
|
||||
vpv->base.st = key->st;
|
||||
|
||||
for (unsigned index = 0; index < vpv->num_inputs; ++index) {
|
||||
unsigned num_inputs = stvp->num_inputs + key->passthrough_edgeflags;
|
||||
for (unsigned index = 0; index < num_inputs; ++index) {
|
||||
unsigned attr = stvp->index_to_input[index];
|
||||
if (attr == ST_DOUBLE_ATTRIB_PLACEHOLDER)
|
||||
continue;
|
||||
|
@@ -211,9 +211,6 @@ struct st_vp_variant
|
||||
*/
|
||||
struct st_common_variant_key key;
|
||||
|
||||
/** similar to that in st_vertex_program, but with edgeflags info too */
|
||||
GLuint num_inputs;
|
||||
|
||||
/** Bitfield of VERT_BIT_* bits of mesa vertex processing inputs */
|
||||
GLbitfield vert_attrib_mask;
|
||||
};
|
||||
|
Reference in New Issue
Block a user