<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><div><span>Hi, everyone. <br><br>Trying to understand method radeonQueryGetResult (more broadly GPU-CPU sync). <br><br>static void radeonQueryGetResult(struct gl_context *ctx, struct gl_query_object *q)<br>{<br> struct radeon_query_object *query = (struct radeon_query_object *)q;<br> uint32_t *result;<br> int i;<br><br> radeon_print(RADEON_STATE, RADEON_VERBOSE,<br> "%s: query id %d, result %d\n",<br> __func__, query->Base.Id, (int) query->Base.Result);<br><br> radeon_bo_map(query->bo, GL_FALSE);<br> result = query->bo->ptr;<br><br> query->Base.Result = 0;<br> for (i = 0; i < query->curr_offset/sizeof(uint32_t); ++i) {<br> query->Base.Result += LE32_TO_CPU(result[i]);<br> radeon_print(RADEON_STATE, RADEON_TRACE, "result[%d] = %d\n", i, LE32_TO_CPU(result[i]));<br> }<br><br> radeon_bo_unmap(query->bo);<br>}<br><br>I
don't know which part is responsible for blocking behavior (waiting for response from GPU). I suspect that </span><span>radeon_bo_map does this magic.</span><br><span>Can someone
point in the right direction?<br><br></span></div><span>Thanks,<br></span></div><span>Vyacheslav<br></span></div>
</div></div>