mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 16:00:09 +01:00
st/nine: Improve D3DQUERYTYPE_TIMESTAMP
Avoid blocking when retrieving D3DQUERYTYPE_TIMESTAMP result with NineQuery9_GetData(), when D3DGETDATA_FLUSH is not specified. This mimics Win behaviour and gives slightly better performance for some games. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Axel Davy <axel.davy@ens.fr> Signed-off-by: Xavier Bouchoux <xavierb@gmail.com>
This commit is contained in:
parent
851abb9145
commit
d838fe8243
1 changed files with 7 additions and 2 deletions
|
|
@ -227,8 +227,13 @@ NineQuery9_GetData( struct NineQuery9 *This,
|
|||
wait_query_result = TRUE;
|
||||
}
|
||||
|
||||
/* Wine tests: D3DQUERYTYPE_TIMESTAMP always succeeds */
|
||||
wait_query_result |= This->type == D3DQUERYTYPE_TIMESTAMP;
|
||||
/* The documention mentions no special case for D3DQUERYTYPE_TIMESTAMP.
|
||||
* However Windows tests show that the query always succeeds when
|
||||
* D3DGETDATA_FLUSH is specified. */
|
||||
if (This->type == D3DQUERYTYPE_TIMESTAMP &&
|
||||
(dwGetDataFlags & D3DGETDATA_FLUSH))
|
||||
wait_query_result = TRUE;
|
||||
|
||||
|
||||
/* Note: We ignore dwGetDataFlags, because get_query_result will
|
||||
* flush automatically if needed */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue