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. */
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;
}
if (key->passthrough_edgeflags) {
NIR_PASS_V(state.ir.nir, nir_lower_passthrough_edgeflags);
- vpv->num_inputs++;
finalize = true;
}
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) {
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;
*/
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;
};