wined3d: buffer_get_sysmem() potentially invalidates the current element array buffer binding.
This fixes a regression introduced by commit
2a7a237170
.
This commit is contained in:
parent
4dc28005eb
commit
fadd192cba
|
@ -678,6 +678,12 @@ BYTE *buffer_get_sysmem(struct wined3d_buffer *This, const struct wined3d_gl_inf
|
|||
|
||||
This->resource.heapMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->resource.size + RESOURCE_ALIGNMENT);
|
||||
This->resource.allocatedMemory = (BYTE *)(((ULONG_PTR)This->resource.heapMemory + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1));
|
||||
|
||||
if (This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB)
|
||||
{
|
||||
IWineD3DDeviceImpl_MarkStateDirty(This->resource.device, STATE_INDEXBUFFER);
|
||||
}
|
||||
|
||||
ENTER_GL();
|
||||
GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object));
|
||||
GL_EXTCALL(glGetBufferSubDataARB(This->buffer_type_hint, 0, This->resource.size, This->resource.allocatedMemory));
|
||||
|
|
Loading…
Reference in New Issue