Skip to content

Commit

Permalink
nv2a: Ignore excess inline array data
Browse files Browse the repository at this point in the history
  • Loading branch information
abaire authored and mborgerson committed May 28, 2022
1 parent 8334f29 commit 9f6b967
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions hw/xbox/nv2a/pgraph.c
Original file line number Diff line number Diff line change
Expand Up @@ -6781,15 +6781,14 @@ static unsigned int pgraph_bind_inline_array(NV2AState *d)

unsigned int vertex_size = offset;
unsigned int index_count = pg->inline_array_length*4 / vertex_size;
assert((index_count*vertex_size) == (pg->inline_array_length*4));

NV2A_DPRINTF("draw inline array %d, %d\n", vertex_size, index_count);

nv2a_profile_inc_counter(NV2A_PROF_GEOM_BUFFER_UPDATE_2);
glBindBuffer(GL_ARRAY_BUFFER, pg->gl_inline_array_buffer);
glBufferData(GL_ARRAY_BUFFER, NV2A_MAX_BATCH_LENGTH * sizeof(uint32_t),
NULL, GL_STREAM_DRAW);
glBufferSubData(GL_ARRAY_BUFFER, 0, pg->inline_array_length*4, pg->inline_array);
glBufferSubData(GL_ARRAY_BUFFER, 0, index_count * vertex_size, pg->inline_array);
pgraph_bind_vertex_attributes(d, 0, index_count-1, true, vertex_size,
index_count-1);

Expand Down

0 comments on commit 9f6b967

Please sign in to comment.