mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
r600g: fix rendering with a vertex attrib having a zero stride
The hardware supports zero stride just fine. This is a port
of 2af8a19831 from r300g.
NOTE: This is a candidate for both the 7.9 and 7.10 branches.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
This commit is contained in:
parent
d19b5cbd31
commit
4523285e51
1 changed files with 6 additions and 4 deletions
|
|
@ -187,11 +187,13 @@ void r600_set_vertex_buffers(struct pipe_context *ctx, unsigned count,
|
|||
rctx->any_user_vbs = TRUE;
|
||||
pipe_resource_reference(&rctx->vertex_buffer[i].buffer, buffers[i].buffer);
|
||||
|
||||
/* The stride of zero means we will be fetching only the first
|
||||
* vertex, so don't care about max_index. */
|
||||
if (!vbo->stride)
|
||||
continue;
|
||||
|
||||
if (vbo->max_index == ~0) {
|
||||
if (!vbo->stride)
|
||||
vbo->max_index = 1;
|
||||
else
|
||||
vbo->max_index = (vbo->buffer->width0 - vbo->buffer_offset) / vbo->stride;
|
||||
vbo->max_index = (vbo->buffer->width0 - vbo->buffer_offset) / vbo->stride;
|
||||
}
|
||||
max_index = MIN2(vbo->max_index, max_index);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue