mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 19:20:12 +01:00
mesa/st: Clean up a bit of st_prepare_vertex_program().
Now that the input attrib mapping is gone, this is simpler. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8044>
This commit is contained in:
parent
3a42e92a4f
commit
74056f6358
1 changed files with 3 additions and 12 deletions
|
|
@ -425,20 +425,11 @@ st_prepare_vertex_program(struct gl_program *prog)
|
|||
{
|
||||
struct gl_vertex_program *stvp = (struct gl_vertex_program *)prog;
|
||||
|
||||
stvp->num_inputs = 0;
|
||||
stvp->vert_attrib_mask = 0;
|
||||
memset(stvp->result_to_output, ~0, sizeof(stvp->result_to_output));
|
||||
|
||||
/* Determine number of inputs and input attrib semantic info.
|
||||
*/
|
||||
for (unsigned attr = 0; attr < VERT_ATTRIB_MAX; attr++) {
|
||||
if ((prog->info.inputs_read & BITFIELD64_BIT(attr)) != 0) {
|
||||
stvp->vert_attrib_mask |= BITFIELD_BIT(attr);
|
||||
stvp->num_inputs++;
|
||||
}
|
||||
}
|
||||
stvp->num_inputs = util_bitcount64(prog->info.inputs_read);
|
||||
stvp->vert_attrib_mask = prog->info.inputs_read;
|
||||
|
||||
/* Compute mapping of vertex program outputs to slots. */
|
||||
memset(stvp->result_to_output, ~0, sizeof(stvp->result_to_output));
|
||||
unsigned num_outputs = 0;
|
||||
for (unsigned attr = 0; attr < VARYING_SLOT_MAX; attr++) {
|
||||
if (prog->info.outputs_written & BITFIELD64_BIT(attr))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue