nir: fix missing increments of num_inputs/num_outputs

Note: not quite perfect, we should use type_size vfunc (in
compiler_options or nir_shader?) to determine how much we
increment num_inputs/outputs/uniforms.  But we don't have
that yet, so let's at least fix things for the existing
users of these passes.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Acked-by: Jason Ekstrand <jason.ekstrand@intel.com>
This commit is contained in:
Rob Clark 2015-11-04 16:10:52 -05:00
parent fec9367deb
commit c73f40c473
2 changed files with 4 additions and 0 deletions

View file

@ -55,9 +55,11 @@ create_clipdist_var(nir_shader *shader, unsigned drvloc,
if (output) {
exec_list_push_tail(&shader->outputs, &var->node);
shader->num_outputs++; /* TODO use type_size() */
}
else {
exec_list_push_tail(&shader->inputs, &var->node);
shader->num_inputs++; /* TODO use type_size() */
}
return var;
}

View file

@ -60,6 +60,8 @@ create_input(nir_shader *shader, unsigned drvloc, gl_varying_slot slot)
exec_list_push_tail(&shader->inputs, &var->node);
shader->num_inputs++; /* TODO use type_size() */
return var;
}