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

2014-11-24 Thread John Ettedgui
On Sun Nov 23 2014 at 2:51:42 AM Marek Olšák wrote: > A few Gallium queries don't need and it's invalid to call begin_query. > Those are PIPE_QUERY_GPU_FINISHED (D3DQUERYTYPE_EVENT) and > PIPE_QUERY_TIMESTAMP (D3DQUERYTYPE_TIMESTAMP). > > Right, Axel explained that to me on irc as well. I didn't

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

2014-11-22 Thread John Ettedgui
On Fri Nov 21 2014 at 10:36:29 PM Ilia Mirkin wrote: > Right, I figured as much. My point is that doing what I'm proposing > there would allow such usage even though it is illegal based on the > API description. > > Alright. > It requires a begin_query for some but not all queries. > > Perhaps t

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

2014-11-22 Thread John Ettedgui
On Fri Nov 21 2014 at 9:57:46 PM Ilia Mirkin wrote: > On Sat, Nov 22, 2014 at 12:44 AM, John Ettedgui > wrote: > > On Fri Nov 21 2014 at 7:50:03 PM Ilia Mirkin > wrote: > >> > >> What's the actual problem? > > > > If you mean in-game,

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

2014-11-22 Thread John Ettedgui
On Fri Nov 21 2014 at 10:51:59 PM Ilia Mirkin wrote: > > No, but it seems like my proposed code above handles all the > situations... if it's in the Building state (aka 'RUNNING'), then it > just executes end_query. If it's in any other state (i.e. FRESH, > ENDED, or FLUSHED) it will start a quer

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

2014-11-22 Thread John Ettedgui
On Fri Nov 21 2014 at 10:14:19 PM Ilia Mirkin 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

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

2014-11-22 Thread John Ettedgui
On Sat Nov 22 2014 at 2:05:59 AM Axel Davy wrote: > > After reading the documentation and the code myself, I think Ilia's > comment are right. > The current patch won't issue a query when the applications issues > D3DISSUE_END directly, whereas > Ilia's proposed code does. > > Alright, after talk

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

2014-11-22 Thread John Ettedgui
On Fri Nov 21 2014 at 7:50:03 PM Ilia Mirkin wrote: > What's the actual problem? If you mean in-game, a blocking black screen, the game wants to display something but is unable to and keeps trying pretty much forever. > If there's no begin, then a new query would > remain marked as FRESH. This

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

2014-11-22 Thread John Ettedgui
So I tried both code you thought of. 1) Always having end_query did not seem to get a different behavior from my patch. (I'm sure it does somewhere but I didn't see that in my quick test). 2) Your 2nd code is more problematic (adding the begin_query as needed) The game completely dies/freezes, an