galahad_get_query_result(struct pipe_context *_pipe,
struct pipe_query *query,
boolean wait,
- void *result)
+ union pipe_query_result *result)
{
struct galahad_context *glhd_pipe = galahad_context(_pipe);
struct pipe_context *pipe = glhd_pipe->pipe;
static boolean i915_get_query_result(struct pipe_context *ctx,
struct pipe_query *query,
boolean wait,
- void *vresult)
+ union pipe_query_result *vresult)
{
uint64_t *result = (uint64_t*)vresult;
identity_get_query_result(struct pipe_context *_pipe,
struct pipe_query *query,
boolean wait,
- void *result)
+ union pipe_query_result *result)
{
struct identity_context *id_pipe = identity_context(_pipe);
struct pipe_context *pipe = id_pipe->pipe;
llvmpipe_get_query_result(struct pipe_context *pipe,
struct pipe_query *q,
boolean wait,
- void *vresult)
+ union pipe_query_result *vresult)
{
struct llvmpipe_query *pq = llvmpipe_query(q);
uint64_t *result = (uint64_t *)vresult;
wait = (lp->render_cond_mode == PIPE_RENDER_COND_WAIT ||
lp->render_cond_mode == PIPE_RENDER_COND_BY_REGION_WAIT);
- b = pipe->get_query_result(pipe, lp->render_cond_query, wait, &result);
+ b = pipe->get_query_result(pipe, lp->render_cond_query, wait, (void*)&result);
if (b)
return result > 0;
else
static boolean noop_get_query_result(struct pipe_context *ctx,
struct pipe_query *query,
- boolean wait, void *vresult)
+ boolean wait,
+ union pipe_query_result *vresult)
{
uint64_t *result = (uint64_t*)vresult;
static boolean
nv50_query_result(struct pipe_context *pipe, struct pipe_query *pq,
- boolean wait, void *result)
+ boolean wait, union pipe_query_result *result)
{
struct nv50_query *q = nv50_query(pq);
- uint64_t *res64 = result;
- boolean *res8 = result;
+ uint64_t *res64 = (uint64_t*)result;
+ boolean *res8 = (boolean*)result;
uint64_t *data64 = (uint64_t *)q->data;
if (q->type == PIPE_QUERY_GPU_FINISHED) {
struct pipe_context *pipe = &nvc0->base.pipe;
struct nvc0_so_target *targ;
targ = nvc0_so_target(info->count_from_stream_output);
- pipe->get_query_result(pipe, targ->pq, TRUE, &vert_count);
+ pipe->get_query_result(pipe, targ->pq, TRUE, (void*)&vert_count);
vert_count /= targ->stride;
}
}
static boolean
nvc0_query_result(struct pipe_context *pipe, struct pipe_query *pq,
- boolean wait, void *result)
+ boolean wait, union pipe_query_result *result)
{
struct nvc0_query *q = nvc0_query(pq);
- uint64_t *res64 = result;
- uint32_t *res32 = result;
- boolean *res8 = result;
+ uint64_t *res64 = (uint64_t*)result;
+ uint32_t *res32 = (uint32_t*)result;
+ boolean *res8 = (boolean*)result;
uint64_t *data64 = (uint64_t *)q->data;
unsigned i;
* the existing query to notify completion, but it could be better.
*/
if (q->object)
- pipe->get_query_result(pipe, pq, 1, &tmp);
+ pipe->get_query_result(pipe, pq, 1, (void*)&tmp);
while (nouveau_resource_alloc(nvfx->screen->query_heap, 1, NULL, &q->object))
{
struct nvfx_query* oldestq;
assert(!LIST_IS_EMPTY(&nvfx->screen->query_list));
oldestq = LIST_ENTRY(struct nvfx_query, nvfx->screen->query_list.next, list);
- pipe->get_query_result(pipe, (struct pipe_query*)oldestq, 1, &tmp);
+ pipe->get_query_result(pipe, (struct pipe_query*)oldestq, 1, (void*)&tmp);
}
LIST_ADDTAIL(&q->list, &nvfx->screen->query_list);
static boolean
nvfx_query_result(struct pipe_context *pipe, struct pipe_query *pq,
- boolean wait, void *vresult)
+ boolean wait, union pipe_query_result *vresult)
{
uint64_t *result = (uint64_t *)vresult;
struct nvfx_context *nvfx = nvfx_context(pipe);
static boolean r300_get_query_result(struct pipe_context* pipe,
struct pipe_query* query,
boolean wait,
- void* vresult)
+ union pipe_query_result *vresult)
{
struct r300_context* r300 = r300_context(pipe);
struct r300_query *q = r300_query(query);
wait = mode == PIPE_RENDER_COND_WAIT ||
mode == PIPE_RENDER_COND_BY_REGION_WAIT;
- if (r300_get_query_result(pipe, query, wait, &result)) {
+ if (r300_get_query_result(pipe, query, wait, (void*)&result)) {
r300->skip_rendering = result == 0;
}
}
static boolean r600_get_query_result(struct pipe_context *ctx,
struct pipe_query *query,
- boolean wait, void *vresult)
+ boolean wait, union pipe_query_result *vresult)
{
struct r600_context *rctx = (struct r600_context *)ctx;
struct r600_query *rquery = (struct r600_query *)query;
rbug_get_query_result(struct pipe_context *_pipe,
struct pipe_query *query,
boolean wait,
- void *result)
+ union pipe_query_result *result)
{
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
softpipe_get_query_result(struct pipe_context *pipe,
struct pipe_query *q,
boolean wait,
- void *vresult)
+ union pipe_query_result *vresult)
{
struct softpipe_query *sq = softpipe_query(q);
uint64_t *result = (uint64_t*)vresult;
wait = (sp->render_cond_mode == PIPE_RENDER_COND_WAIT ||
sp->render_cond_mode == PIPE_RENDER_COND_BY_REGION_WAIT);
- b = pipe->get_query_result(pipe, sp->render_cond_query, wait, &result);
+ b = pipe->get_query_result(pipe, sp->render_cond_query, wait,
+ (void*)&result);
if (b)
return result > 0;
else
static boolean svga_get_query_result(struct pipe_context *pipe,
struct pipe_query *q,
boolean wait,
- void *result);
+ union pipe_query_result *result);
static struct pipe_query *svga_create_query( struct pipe_context *pipe,
unsigned query_type )
*/
uint64_t result;
- svga_get_query_result(pipe, q, TRUE, &result);
+ svga_get_query_result(pipe, q, TRUE, (void*)&result);
assert(sq->queryResult->state != SVGA3D_QUERYSTATE_PENDING);
}
static boolean svga_get_query_result(struct pipe_context *pipe,
struct pipe_query *q,
boolean wait,
- void *vresult)
+ union pipe_query_result *vresult)
{
struct svga_context *svga = svga_context( pipe );
struct svga_screen *svgascreen = svga_screen( pipe->screen );
trace_context_get_query_result(struct pipe_context *_pipe,
struct pipe_query *query,
boolean wait,
- void *presult)
+ union pipe_query_result *presult)
{
struct trace_context *tr_ctx = trace_context(_pipe);
struct pipe_context *pipe = tr_ctx->pipe;
trace_dump_arg(ptr, pipe);
_result = pipe->get_query_result(pipe, query, wait, presult);
+ /* XXX this depends on the query type */
result = *((uint64_t*)presult);
trace_dump_arg(uint, result);
!pipe->get_query_result(pipe,
stq->pq,
TRUE,
- &q->Result))
+ (void*)&q->Result))
{
/* nothing */
}
struct pipe_context *pipe = st_context(ctx)->pipe;
struct st_query_object *stq = st_query_object(q);
assert(!q->Ready); /* we should not get called if Ready is TRUE */
- q->Ready = pipe->get_query_result(pipe, stq->pq, FALSE, &q->Result);
+ q->Ready = pipe->get_query_result(pipe, stq->pq, FALSE, (void*)&q->Result);
}