iris: propagate error from gen_perf_begin_query to glBeginPerfQueryINTEL

Otherwise mesa will crash in glEndPerfQueryINTEL because OA BO is NULL.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6094>
This commit is contained in:
Marcin Ślusarz 2020-07-27 21:10:25 +02:00 committed by Marge Bot
parent 0f9131d096
commit 627c01977c
3 changed files with 4 additions and 6 deletions

View File

@ -97,7 +97,7 @@ iris_new_perf_query_obj(struct pipe_context *pipe, unsigned query_index)
return (struct pipe_query *)&q->base;
}
static void
static bool
iris_begin_perf_query(struct pipe_context *pipe, struct pipe_query *q)
{
struct iris_context *ice = (void *) pipe;
@ -105,7 +105,7 @@ iris_begin_perf_query(struct pipe_context *pipe, struct pipe_query *q)
struct gen_perf_query_object *obj = perf_query->query;
struct gen_perf_context *perf_ctx = ice->perf_ctx;
gen_perf_begin_query(perf_ctx, obj);
return gen_perf_begin_query(perf_ctx, obj);
}
static void

View File

@ -219,7 +219,7 @@ struct pipe_context {
struct pipe_query *(*new_intel_perf_query_obj)(struct pipe_context *pipe,
unsigned query_index);
void (*begin_intel_perf_query)(struct pipe_context *pipe, struct pipe_query *q);
bool (*begin_intel_perf_query)(struct pipe_context *pipe, struct pipe_query *q);
void (*end_intel_perf_query)(struct pipe_context *pipe, struct pipe_query *q);

View File

@ -152,9 +152,7 @@ st_BeginPerfQuery(struct gl_context *ctx, struct gl_perf_query_object *o)
assert(!o->Active);
assert(!o->Used || o->Ready); /* no in-flight query to worry about */
pipe->begin_intel_perf_query(pipe, (struct pipe_query *)o);
return true;
return pipe->begin_intel_perf_query(pipe, (struct pipe_query *)o);
}
static void