Re: Fwd: GPU-CPU sync during radeonQueryGetResult

Brian Paul <[email protected]>
Newsgroups gmane.comp.video.mesa3d.user
Message-ID <[email protected]>
On 07/06/2015 08:09 AM, Vyacheslav Gonakhchyan wrote:
> Hi, everyone.
>
> Trying to understand method radeonQueryGetResult (more broadly GPU-CPU
> sync).
>
> static void radeonQueryGetResult(struct gl_context *ctx, struct
> gl_query_object *q)
> {
>      struct radeon_query_object *query = (struct radeon_query_object *)q;
>          uint32_t *result;
>      int i;
>
>      radeon_print(RADEON_STATE, RADEON_VERBOSE,
>              "%s: query id %d, result %d\n",
>              __func__, query->Base.Id, (int) query->Base.Result);
>
>      radeon_bo_map(query->bo, GL_FALSE);
>          result = query->bo->ptr;
>
>      query->Base.Result = 0;
>      for (i = 0; i < query->curr_offset/sizeof(uint32_t); ++i) {
>          query->Base.Result += LE32_TO_CPU(result[i]);
>          radeon_print(RADEON_STATE, RADEON_TRACE, "result[%d] = %d\n",
> i, LE32_TO_CPU(result[i]));
>      }
>
>      radeon_bo_unmap(query->bo);
> }
>
> I don't know which part is responsible for blocking behavior (waiting
> for response from GPU). I suspect that radeon_bo_map does this magic.
> Can someone point in the right direction?

I suggest that you ask this on the mesa-dev list where the developers 
can comment.

-Brian


_______________________________________________
mesa-users mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.