Skip to content

Commit

Permalink
nv2a: Fix handling of 0-stride vertex attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
abaire committed Feb 11, 2022
1 parent 70cfddc commit 60340e2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions hw/xbox/nv2a/pgraph.c
Original file line number Diff line number Diff line change
Expand Up @@ -6674,11 +6674,15 @@ static void pgraph_bind_vertex_attributes(NV2AState *d,
}
if (stride) {
last_entry += stride * provoking_element_index;
pgraph_update_inline_value(attr, last_entry);
} else {
last_entry += element_size * provoking_element_index;
// Stride of 0 indicates that only the first element should be
// used.
pgraph_update_inline_value(attr, last_entry);
glDisableVertexAttribArray(i);
glVertexAttrib4fv(i, attr->inline_value);
continue;
}

pgraph_update_inline_value(attr, last_entry);
}

NV2A_GL_DGROUP_END();
Expand Down

0 comments on commit 60340e2

Please sign in to comment.