return TRUE;
if (!wined3d_resource_allocate_sysmem(&buffer->resource))
+ {
+ ERR("Failed to allocate system memory.\n");
return FALSE;
+ }
return TRUE;
case WINED3D_LOCATION_BUFFER:
}
GL_EXTCALL(glUnmapBuffer(buffer->buffer_type_hint));
+ if (wined3d_settings.strict_draw_ordering)
+ gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
context_release(context);
buffer_clear_dirty_areas(buffer);
buffer->bind_flags = bind_flags;
buffer->locations = WINED3D_LOCATION_SYSMEM;
- if (!wined3d_resource_allocate_sysmem(&buffer->resource))
- return E_OUTOFMEMORY;
-
TRACE("buffer %p, size %#x, usage %#x, format %s, memory @ %p.\n",
buffer, buffer->resource.size, buffer->resource.usage,
debug_d3dformat(buffer->resource.format->id), buffer->resource.heap_memory);
if (data)
wined3d_device_update_sub_resource(device, &buffer->resource,
- 0, NULL, data->data, data->row_pitch, data->slice_pitch, 0);
+ 0, NULL, data->data, data->row_pitch, data->slice_pitch);
return WINED3D_OK;
}