[Mesa-dev] [PATCH 10/16] st/nine: Improve D3DQUERYTYPE_TIMESTAMP
Ilia Mirkin
imirkin at alum.mit.edu
Fri Apr 24 14:29:20 PDT 2015
That makes sense. Probably the FLUSH is supposed to imply something
else, which in turn just makes the timestamp query succeed...
something like
if (flush)
pipe->flush()
or something. That's basically what telling it to wait does though, so
this is fine.
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
On Fri, Apr 24, 2015 at 4:09 PM, Axel Davy <axel.davy at ens.fr> wrote:
> From: Xavier Bouchoux <xavierb at gmail.com>
>
> 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: Axel Davy <axel.davy at ens.fr>
> Signed-off-by: Xavier Bouchoux <xavierb at gmail.com>
> ---
> src/gallium/state_trackers/nine/query9.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/state_trackers/nine/query9.c b/src/gallium/state_trackers/nine/query9.c
> index df49340..04f4aad 100644
> --- a/src/gallium/state_trackers/nine/query9.c
> +++ b/src/gallium/state_trackers/nine/query9.c
> @@ -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 */
> --
> 2.1.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list