[Mesa-stable] [Mesa-dev] [PATCH 11/11] st/nine: return S_FALSE instead of INVALIDCALL when in building query state

Ilia Mirkin imirkin at alum.mit.edu
Sun Nov 23 22:11:32 PST 2014


On Sun, Nov 23, 2014 at 5:40 PM, David Heidelberg <david at ixit.cz> wrote:
> From: Axel Davy <axel.davy at ens.fr>
>
> It is the same behaviour as wine has.
>
> Cc: "10.4" <mesa-stable at lists.freedesktop.org>
> Reviewed-by: David Heidelberg <david at ixit.cz>
> Signed-off-by: Axel Davy <axel.davy at ens.fr>
> ---
>  src/gallium/state_trackers/nine/query9.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/state_trackers/nine/query9.c b/src/gallium/state_trackers/nine/query9.c
> index f32f572..c244379 100644
> --- a/src/gallium/state_trackers/nine/query9.c
> +++ b/src/gallium/state_trackers/nine/query9.c
> @@ -255,7 +255,7 @@ NineQuery9_GetData( struct NineQuery9 *This,
>      DBG("This=%p pData=%p dwSize=%d dwGetDataFlags=%d\n",
>          This, pData, dwSize, dwGetDataFlags);
>
> -    user_assert(This->state != NINE_QUERY_STATE_RUNNING, D3DERR_INVALIDCALL);
> +    user_assert(This->state != NINE_QUERY_STATE_RUNNING, S_FALSE);

Add a comment about why you're doing this. It's very explicitly
against the d3d9 documentation which says it's supposed to return an
error code when in the "Building" state.

>      user_assert(dwSize == 0 || pData, D3DERR_INVALIDCALL);
>      user_assert(dwGetDataFlags == 0 ||
>                  dwGetDataFlags == D3DGETDATA_FLUSH, D3DERR_INVALIDCALL);
> --
> 2.1.3
>
> _______________________________________________
> 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