Module: Mesa Branch: master Commit: 627c01977c29d142d5024591bf910a1ed92814c9 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=627c01977c29d142d5024591bf910a1ed92814c9
Author: Marcin Ślusarz <[email protected]> Date: Mon Jul 27 21:10:25 2020 +0200 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 <[email protected]> Cc: <[email protected]> Reviewed-by: Mark Janes <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6094> --- src/gallium/drivers/iris/iris_performance_query.c | 4 ++-- src/gallium/include/pipe/p_context.h | 2 +- src/mesa/state_tracker/st_cb_perfquery.c | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/iris/iris_performance_query.c b/src/gallium/drivers/iris/iris_performance_query.c index dbe649c2762..1e8e1d9201a 100644 --- a/src/gallium/drivers/iris/iris_performance_query.c +++ b/src/gallium/drivers/iris/iris_performance_query.c @@ -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 diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index 1869d22ad47..f17bf2d3fc8 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -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); diff --git a/src/mesa/state_tracker/st_cb_perfquery.c b/src/mesa/state_tracker/st_cb_perfquery.c index b405703e311..1bafc272c2d 100644 --- a/src/mesa/state_tracker/st_cb_perfquery.c +++ b/src/mesa/state_tracker/st_cb_perfquery.c @@ -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 _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
