From: Neha Bhende Date: Tue, 29 Jan 2019 19:21:00 +0000 (-0700) Subject: st/mesa: Fix topogun-1.06-orc-84k-resize.trace crash X-Git-Tag: upstream/19.3.0~10108 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69d736b17a96a4d7a21c3c88fd787091acc1def0;p=platform%2Fupstream%2Fmesa.git st/mesa: Fix topogun-1.06-orc-84k-resize.trace crash We need to initialize all fields in rs->prim explicitly while creating new rastpos stage. Fixes: bac8534267 ("st/mesa: allow glDrawElements to work with GL_SELECT feedback") v2: Initializing all fields in rs->prim as per Ilia. Reviewed-by: Brian Paul Reviewed-by: Ilia Mirkin --- diff --git a/src/mesa/state_tracker/st_cb_rasterpos.c b/src/mesa/state_tracker/st_cb_rasterpos.c index fecaaf7..c54b50d 100644 --- a/src/mesa/state_tracker/st_cb_rasterpos.c +++ b/src/mesa/state_tracker/st_cb_rasterpos.c @@ -208,6 +208,10 @@ new_draw_rastpos_stage(struct gl_context *ctx, struct draw_context *draw) rs->prim.end = 1; rs->prim.start = 0; rs->prim.count = 1; + rs->prim.pad = 0; + rs->prim.num_instances = 1; + rs->prim.base_instance = 0; + rs->prim.is_indirect = 0; return rs; }