[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:21:57 PST 2014


On Fri Nov 21 2014 at 9:57:46 PM Ilia Mirkin <imirkin at alum.mit.edu> wrote:

> On Sat, Nov 22, 2014 at 12:44 AM, John Ettedgui <john.ettedgui at gmail.com>
> wrote:
> > On Fri Nov 21 2014 at 7:50:03 PM Ilia Mirkin <imirkin at alum.mit.edu>
> 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.
>
> I meant at the API level. i.e. what is the API call sequence leading
> to the problem, what is being returned, and what ought to be getting
> returned.
>
> I don't have the logs right now, but this I what I believe happened (I can
dig them if you want):
- NineQuery9_new
- NineQuery9_Issue(This, D3DISSUE_END), which returned D3D_OK (and still
does with my patch)
- NineQuery9_GetData(This, pData, dwSize, 0)
- NineQuery9_GetData(This, pData, dwSize, 0)
- NineQuery9_GetData(This, pData, dwSize, 0)
etc...
GetData always returned S_OK but never filled the pData with any data.
I assumed the game kept calling GetData again and again as it was not
getting its data.

> >>
> >> If there's no begin, then a new query would
> >> remain marked as FRESH.
> >
> > This is not my understanding of the Query on msdn:
> > http://msdn.microsoft.com/en-us/library/windows/desktop/
> bb147308%28v=vs.85%29.aspx
> > As you can see on the 1st diagram, we have either cases:
> > Signaled State moved to Building State on D3DISSUE_BEGIN and then to
> Issued
> > State on D3DISSUE_END (this part worked fine before).
> >
> > Then we have Signaled Sated moved to Issued State on D3DISSUE_END, that's
> > the part I believe was not working before this patch.
>
> These are hidden states, and query9.c does not implement them
> directly.

I see

> What's the actual API call sequence, and what is being
> wrongly returned?
>
As written above.

>
> >
> > Of course all of that is based on me thinking FRESH is nine's version of
> > Signaled.
>
> From my read of the code, FRESH is a newly constructed query,

agreed

> ENDED is
> when pipe->end_query was issued.

That is not what I understood but you may be right.

> All the state usage is entirely
> contained in query9.c -- take a look at it.

Right

> However this is purely an
> implementation detail. At the end of the day, some API call is made
> and it's not returning the expected data. It's not clear from the
> commit log as to what you believe the issue is.
>
> I believed the issue was the lack of state transition of
ISSUE(D3DISSUE_END) without a previous ISSUE(D3DISSUE_BEGIN) .

> >
> >>
> >> Should _GetData 0 out the result in that case
> >> perhaps instead of insta-returning?
> >>
> > You are correct that this is the exact reason why I made the change.
> > In my game, GetData kept getting called, and kept returning no data
> because
> > of the State the Queue was in (in its current implementation).
> >
> > What do you mean by "0 out the result" though?
>
> memset(pData, 0, dwSize) in GetData if This->state == FRESH.
>
> I see, though I'm not sure how it would help.
What return value would you see for that?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-stable/attachments/20141122/cc7b6a67/attachment-0001.html>


More information about the mesa-stable mailing list