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>
(cherry picked from commit 627c01977c)
This commit is contained in:
Marcin Ślusarz 2020-07-27 21:10:25 +02:00 committed by Eric Engestrom
parent 6c1358b024
commit e650150c81
4 changed files with 5 additions and 7 deletions

View file

@ -2749,7 +2749,7 @@
"description": "iris: propagate error from gen_perf_begin_query to glBeginPerfQueryINTEL",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": null
},

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