Mesa (master): i965: propagate error from gen_perf_begin_query to glBeginPerfQueryINTEL

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 28 11:04:01 UTC 2020


Module: Mesa
Branch: master
Commit: 884718313c80a2902b6f60b6ded63a6290d40ac7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=884718313c80a2902b6f60b6ded63a6290d40ac7

Author: Marcin Ślusarz <marcin.slusarz at intel.com>
Date:   Tue Jul 28 11:55:16 2020 +0200

i965: 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 at intel.com>
Cc: <mesa-stable at lists.freedesktop.org>
Reviewed-by: Mark Janes <mark.a.janes at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6094>

---

 src/mesa/drivers/dri/i965/brw_performance_query.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c
index ab2f200a1fa..6c74403da6c 100644
--- a/src/mesa/drivers/dri/i965/brw_performance_query.c
+++ b/src/mesa/drivers/dri/i965/brw_performance_query.c
@@ -247,12 +247,12 @@ brw_begin_perf_query(struct gl_context *ctx,
 
    DBG("Begin(%d)\n", o->Id);
 
-   gen_perf_begin_query(perf_ctx, obj);
+   bool ret = gen_perf_begin_query(perf_ctx, obj);
 
    if (INTEL_DEBUG & DEBUG_PERFMON)
       dump_perf_queries(brw);
 
-   return true;
+   return ret;
 }
 
 /**



More information about the mesa-commit mailing list