From 96f164f6f047833091eb98a73aa80c31dc94f962 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Sat, 5 Jul 2014 12:46:03 +0200 Subject: gallium: make pipe_context::begin_query return a boolean MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GL_AMD_performance_monitor must return an error when a monitoring session cannot be started. Signed-off-by: Samuel Pitoiset Reviewed-by: Marek Olšák Reviewed-by: Martin Peres --- src/gallium/drivers/nouveau/nv30/nv30_query.c | 5 +++-- src/gallium/drivers/nouveau/nv50/nv50_query.c | 3 ++- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src/gallium/drivers/nouveau') diff --git a/src/gallium/drivers/nouveau/nv30/nv30_query.c b/src/gallium/drivers/nouveau/nv30/nv30_query.c index ace2cdcd795..516ee83168e 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_query.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_query.c @@ -144,7 +144,7 @@ nv30_query_destroy(struct pipe_context *pipe, struct pipe_query *pq) FREE(pq); } -static void +static boolean nv30_query_begin(struct pipe_context *pipe, struct pipe_query *pq) { struct nv30_context *nv30 = nv30_context(pipe); @@ -160,7 +160,7 @@ nv30_query_begin(struct pipe_context *pipe, struct pipe_query *pq) } break; case PIPE_QUERY_TIMESTAMP: - return; + return true; default: BEGIN_NV04(push, NV30_3D(QUERY_RESET), 1); PUSH_DATA (push, q->report); @@ -171,6 +171,7 @@ nv30_query_begin(struct pipe_context *pipe, struct pipe_query *pq) BEGIN_NV04(push, SUBC_3D(q->enable), 1); PUSH_DATA (push, 1); } + return true; } static void diff --git a/src/gallium/drivers/nouveau/nv50/nv50_query.c b/src/gallium/drivers/nouveau/nv50/nv50_query.c index 23b6d1eeb0c..6690aa282eb 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_query.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_query.c @@ -138,7 +138,7 @@ nv50_query_get(struct nouveau_pushbuf *push, struct nv50_query *q, PUSH_DATA (push, get); } -static void +static boolean nv50_query_begin(struct pipe_context *pipe, struct pipe_query *pq) { struct nv50_context *nv50 = nv50_context(pipe); @@ -201,6 +201,7 @@ nv50_query_begin(struct pipe_context *pipe, struct pipe_query *pq) break; } q->ready = FALSE; + return true; } static void diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c index 477ca8027ca..01e7b37b55f 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c @@ -250,7 +250,7 @@ nvc0_query_rotate(struct nvc0_context *nvc0, struct nvc0_query *q) nvc0_query_allocate(nvc0, q, NVC0_QUERY_ALLOC_SPACE); } -static void +static boolean nvc0_query_begin(struct pipe_context *pipe, struct pipe_query *pq) { struct nvc0_context *nvc0 = nvc0_context(pipe); @@ -332,6 +332,7 @@ nvc0_query_begin(struct pipe_context *pipe, struct pipe_query *pq) break; } q->state = NVC0_QUERY_STATE_ACTIVE; + return true; } static void -- cgit v1.2.3