[Mesa-stable] [Mesa-dev] [PATCH 5/8] st/nine: Queries: Fix D3DISSUE_END behaviour.

Ilia Mirkin imirkin at alum.mit.edu
Tue Dec 2 13:30:05 PST 2014


On Tue, Dec 2, 2014 at 4:12 PM, Axel Davy <axel.davy at ens.fr> wrote:
> Issuing D3DISSUE_END should:
> . reset previous queries if possible
> . end the query
>
> Previous behaviour wasn't calling end_query for
> queries not needing D3DISSUE_BEGIN, no resetting

noR resetting

> previous queries.
>
> This fixes several applications not launching properly.
>
> Cc: "10.4" <mesa-stable at lists.freedesktop.org>
> Tested-by: David Heidelberg <david at ixit.cz>
> Signed-off-by: Axel Davy <axel.davy at ens.fr>
> ---
>  src/gallium/state_trackers/nine/query9.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/state_trackers/nine/query9.c b/src/gallium/state_trackers/nine/query9.c
> index a3184d9..dfb17b9 100644
> --- a/src/gallium/state_trackers/nine/query9.c
> +++ b/src/gallium/state_trackers/nine/query9.c
> @@ -174,10 +174,12 @@ NineQuery9_Issue( struct NineQuery9 *This,
>          pipe->begin_query(pipe, This->pq);
>          This->state = NINE_QUERY_STATE_RUNNING;
>      } else {
> -        if (This->state == NINE_QUERY_STATE_RUNNING) {
> -            pipe->end_query(pipe, This->pq);
> -            This->state = NINE_QUERY_STATE_ENDED;
> -        }
> +        if (This->state != NINE_QUERY_STATE_RUNNING &&
> +            This->type != D3DQUERYTYPE_EVENT &&
> +            This->type != D3DQUERYTYPE_TIMESTAMP)
> +            pipe->begin_query(pipe, This->pq);
> +        pipe->end_query(pipe, This->pq);
> +        This->state = NINE_QUERY_STATE_ENDED;
>      }
>      return D3D_OK;
>  }
> --
> 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-stable mailing list