diff options
author | Zack Rusin <zackr@vmware.com> | 2013-05-08 23:48:20 -0400 |
---|---|---|
committer | Zack Rusin <zackr@vmware.com> | 2013-05-14 03:09:32 -0400 |
commit | 29853ab7b8656cee9b92a53bec43f6e9f1e49691 (patch) | |
tree | 6b4ac7f1accc0358717fe98d6e8b1c5b982baafb /src/gallium/drivers/nv30 | |
parent | 386327c48f88b052449afa4f41b1090d3fdb5ce9 (diff) | |
download | external_mesa3d-29853ab7b8656cee9b92a53bec43f6e9f1e49691.zip external_mesa3d-29853ab7b8656cee9b92a53bec43f6e9f1e49691.tar.gz external_mesa3d-29853ab7b8656cee9b92a53bec43f6e9f1e49691.tar.bz2 |
draw: don't crash on vertex buffer overflow
We would crash when stride was bigger than the size of the buffer.
The correct behavior is to just fetch zero's in this case.
Unfortunatly with user_buffer's there's no way to validate the size
because currently we're just not getting it. Adjust the draw interface
to pass the size along the mapped buffer, which works perfectly
for buffer backed vertex_buffers and, in future, it will allow
us to plumb user_buffer sizes through the same interface.
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Diffstat (limited to 'src/gallium/drivers/nv30')
-rw-r--r-- | src/gallium/drivers/nv30/nv30_draw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv30/nv30_draw.c b/src/gallium/drivers/nv30/nv30_draw.c index 4dd0df3..92185c9 100644 --- a/src/gallium/drivers/nv30/nv30_draw.c +++ b/src/gallium/drivers/nv30/nv30_draw.c @@ -412,7 +412,7 @@ nv30_render_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info) PIPE_TRANSFER_UNSYNCHRONIZED | PIPE_TRANSFER_READ, &transfer[i]); } - draw_set_mapped_vertex_buffer(draw, i, map); + draw_set_mapped_vertex_buffer(draw, i, map, ~0); } if (info->indexed) { |