[Mesa-stable] [Mesa-dev] [PATCH 3/4] nine: handle D3DISSUE_END without previous D3DISSUE_BEGIN

John Ettedgui john.ettedgui at gmail.com
Fri Nov 21 22:28:28 PST 2014


On Fri Nov 21 2014 at 10:14:19 PM Ilia Mirkin <imirkin at alum.mit.edu> wrote:

> Oh, I think i see the problem.
>
> In GetData:
>
>     user_assert(This->state != NINE_QUERY_STATE_RUNNING,
> D3DERR_INVALIDCALL);
>
> should be
>
>   user_assert(This->state != ... || This->state |= FRESH,
> D3DERR_INVALIDCALL)
>
> This will allow someone to call GetData without first having done an
> Issue() but... meh.

Not saying your idea is wrong but Issue was called before GetData in my
case.
It was just called on D3DISSUE_END, with no call on D3DISSUE_BEGIN.

> You could alternatively rejigger the state
> variables, but that seems excessive.
>
> Actually.... perhaps it's supposed to actually call ->end_query()
> unconditionally in ->Issue even though it hasn't called
> ->begin_query()? That might make even more sense...
>
I thought about that as well, though I thought that end_query() would
require a begin_query() first (though issue does not so maybe...)

>
> And then you'd remove the explicit FRESH handling in GetData since you
> can't get there due to the user_assert.
>
> I see.

>   -ilia
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-stable/attachments/20141122/cbc4c46b/attachment.html>


More information about the mesa-stable mailing list