wined3d: Pass GL_SYNC_FLUSH_COMMANDS_BIT to glClientWaitSync() if WINED3DGETDATA_FLUS...
commit5d470a6e7f8847fdae939dde064566cc8a877e7b
authorHenri Verbeet <hverbeet@codeweavers.com>
Tue, 3 Jan 2017 23:04:49 +0000 (4 00:04 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 4 Jan 2017 10:11:21 +0000 (4 11:11 +0100)
treebc463b3311378b03de8755df2757a477c75b6855
parent9a789feb81f49c75b168d1f6a6406b2ede74cb1d
wined3d: Pass GL_SYNC_FLUSH_COMMANDS_BIT to glClientWaitSync() if WINED3DGETDATA_FLUSH was specified.

Otherwise the application may keep spinning on wined3d_query_get_data() in
case the query wasn't submitted to the GPU yet when wined3d_query_get_data()
was called. This issue was exposed by commit
70889d68664c1211caf5a845014953dfee66c8f4. Note that this won't fix the issue
if the query was created in a different GL context.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/wined3d/query.c
dlls/wined3d/wined3d_private.h