[PATCH 5/5] wined3d: Use buffer_bind() in buffer_conversion_upload().
Józef Kucia
jkucia at codeweavers.com
Mon Oct 24 04:57:28 CDT 2016
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
dlls/wined3d/buffer.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index e0e62c5..a81cd64 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -858,10 +858,6 @@ static void buffer_conversion_upload(struct wined3d_buffer *buffer, struct wined
unsigned int i, j, start, end, len, vertex_count;
BYTE *data;
- /* This would potentially invalidate the element array buffer binding. */
- if (buffer->buffer_type_hint != GL_ARRAY_BUFFER)
- ERR("Converting data in non-vertex buffer.\n");
-
wined3d_buffer_load_location(buffer, context, WINED3D_LOCATION_SYSMEM);
/* Now for each vertex in the buffer that needs conversion. */
@@ -873,6 +869,7 @@ static void buffer_conversion_upload(struct wined3d_buffer *buffer, struct wined
return;
}
+ buffer_bind(buffer, context);
while (buffer->modified_areas)
{
buffer->modified_areas--;
@@ -904,8 +901,6 @@ static void buffer_conversion_upload(struct wined3d_buffer *buffer, struct wined
}
}
- GL_EXTCALL(glBindBuffer(buffer->buffer_type_hint, buffer->buffer_object));
- checkGLcall("glBindBuffer");
GL_EXTCALL(glBufferSubData(buffer->buffer_type_hint, start, len, data + start));
checkGLcall("glBufferSubData");
}
--
2.7.3
More information about the wine-patches
mailing list