wined3d: Get rid of WINED3D_BUFFER_FLUSH.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Stefan Dösinger 2016-04-17 19:07:54 +02:00 committed by Alexandre Julliard
parent fe0342e646
commit d3f8efe546
1 changed files with 5 additions and 8 deletions

View File

@ -32,10 +32,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
#define WINED3D_BUFFER_HASDESC 0x01 /* A vertex description has been found. */ #define WINED3D_BUFFER_HASDESC 0x01 /* A vertex description has been found. */
#define WINED3D_BUFFER_CREATEBO 0x02 /* Create a buffer object for this buffer. */ #define WINED3D_BUFFER_CREATEBO 0x02 /* Create a buffer object for this buffer. */
#define WINED3D_BUFFER_DOUBLEBUFFER 0x04 /* Keep both a buffer object and a system memory copy for this buffer. */ #define WINED3D_BUFFER_DOUBLEBUFFER 0x04 /* Keep both a buffer object and a system memory copy for this buffer. */
#define WINED3D_BUFFER_FLUSH 0x08 /* Manual unmap flushing. */ #define WINED3D_BUFFER_DISCARD 0x08 /* A DISCARD lock has occurred since the last preload. */
#define WINED3D_BUFFER_DISCARD 0x10 /* A DISCARD lock has occurred since the last preload. */ #define WINED3D_BUFFER_SYNC 0x10 /* There has been at least one synchronized map since the last preload. */
#define WINED3D_BUFFER_SYNC 0x20 /* There has been at least one synchronized map since the last preload. */ #define WINED3D_BUFFER_APPLESYNC 0x20 /* Using sync as in GL_APPLE_flush_buffer_range. */
#define WINED3D_BUFFER_APPLESYNC 0x40 /* Using sync as in GL_APPLE_flush_buffer_range. */
#define VB_MAXDECLCHANGES 100 /* After that number of decl changes we stop converting */ #define VB_MAXDECLCHANGES 100 /* After that number of decl changes we stop converting */
#define VB_RESETDECLCHANGE 1000 /* Reset the decl changecount after that number of draws */ #define VB_RESETDECLCHANGE 1000 /* Reset the decl changecount after that number of draws */
@ -176,8 +175,6 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This, struct wine
{ {
GL_EXTCALL(glBufferParameteriAPPLE(This->buffer_type_hint, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE)); GL_EXTCALL(glBufferParameteriAPPLE(This->buffer_type_hint, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE));
checkGLcall("glBufferParameteriAPPLE(This->buffer_type_hint, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE)"); checkGLcall("glBufferParameteriAPPLE(This->buffer_type_hint, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE)");
This->flags |= WINED3D_BUFFER_FLUSH;
GL_EXTCALL(glBufferParameteriAPPLE(This->buffer_type_hint, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_FALSE)); GL_EXTCALL(glBufferParameteriAPPLE(This->buffer_type_hint, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_FALSE));
checkGLcall("glBufferParameteriAPPLE(This->buffer_type_hint, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_FALSE)"); checkGLcall("glBufferParameteriAPPLE(This->buffer_type_hint, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_FALSE)");
This->flags |= WINED3D_BUFFER_APPLESYNC; This->flags |= WINED3D_BUFFER_APPLESYNC;
@ -709,7 +706,7 @@ static void buffer_direct_upload(struct wined3d_buffer *This, const struct wined
GL_EXTCALL(glFlushMappedBufferRange(This->buffer_type_hint, start, len)); GL_EXTCALL(glFlushMappedBufferRange(This->buffer_type_hint, start, len));
checkGLcall("glFlushMappedBufferRange"); checkGLcall("glFlushMappedBufferRange");
} }
else if (This->flags & WINED3D_BUFFER_FLUSH) else if (This->flags & WINED3D_BUFFER_APPLESYNC)
{ {
GL_EXTCALL(glFlushMappedBufferRangeAPPLE(This->buffer_type_hint, start, len)); GL_EXTCALL(glFlushMappedBufferRangeAPPLE(This->buffer_type_hint, start, len));
checkGLcall("glFlushMappedBufferRangeAPPLE"); checkGLcall("glFlushMappedBufferRangeAPPLE");
@ -1093,7 +1090,7 @@ void CDECL wined3d_buffer_unmap(struct wined3d_buffer *buffer)
checkGLcall("glFlushMappedBufferRange"); checkGLcall("glFlushMappedBufferRange");
} }
} }
else if (buffer->flags & WINED3D_BUFFER_FLUSH) else if (buffer->flags & WINED3D_BUFFER_APPLESYNC)
{ {
for (i = 0; i < buffer->modified_areas; ++i) for (i = 0; i < buffer->modified_areas; ++i)
{ {