• Henri Verbeet's avatar
    wined3d: Just use glBufferSubData() in buffer_direct_upload(). · 602a23a6
    Henri Verbeet authored
    It might seem like a good idea to try to use glMapBufferRange() in
    buffer_direct_upload(), but it really isn't. The interesting cases for
    glMapBufferRange() are GL_MAP_INVALIDATE_BUFFER_BIT or
    GL_MAP_UNSYNCHRONIZED_BIT, but the only way for those to be set here
    would be for the buffer to be mapped with WINED3D_MAP_DISCARD or
    WINED3D_MAP_NOOVERWRITE before the buffer object was created. In that
    case the GPU is obviously not using the buffer object, so
    glMapBufferRange() doesn't help. On the other hand, if the buffer is
    currently in use by the application and neither WINED3D_MAP_DISCARD nor
    WINED3D_MAP_NOOVERWRITE is set, glMapBufferRange() would need to wait
    for the GPU to finish using the buffer object, while glBufferSubData()
    may decide not to.
    Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    602a23a6
buffer.c 55.3 KB