<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Nov 8, 2018 at 9:34 AM Emil Velikov <<a href="mailto:emil.l.velikov@gmail.com">emil.l.velikov@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, 27 Oct 2018 at 22:34, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>> wrote:<br>
><br>
> Instead of hard-coding it to look at the VS stage, look at whatever the<br>
> last geometry stage is.<br>
><br>
> Cc: <a href="mailto:mesa-stable@lists.freedesktop.org" target="_blank">mesa-stable@lists.freedesktop.org</a><br>
> ---<br>
> src/mesa/drivers/dri/i965/genX_state_upload.c | 14 +++++++++++++-<br>
> 1 file changed, 13 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c<br>
> index 740cb0c4d2e..56fa5969725 100644<br>
> --- a/src/mesa/drivers/dri/i965/genX_state_upload.c<br>
> +++ b/src/mesa/drivers/dri/i965/genX_state_upload.c<br>
> @@ -1458,6 +1458,17 @@ genX(upload_clip_state)(struct brw_context *brw)<br>
> struct brw_wm_prog_data *wm_prog_data =<br>
> brw_wm_prog_data(brw->wm.base.prog_data);<br>
><br>
> +#if GEN_GEN < 8<br>
> + /* BRW_NEW_VS_PROG_DATA | BRW_NEW_TES_PROG_DATA | BRW_NEW_GS_PROG_DATA */<br>
> + const struct brw_vue_prog_data *vue_prog_data;<br>
> + if (brw->gs.base.prog_data)<br>
> + vue_prog_data = brw_vue_prog_data(brw->gs.base.prog_data);<br>
> + else if (brw->tes.base.prog_data)<br>
> + vue_prog_data = brw_vue_prog_data(brw->tes.base.prog_data);<br>
> + else<br>
> + vue_prog_data = brw_vue_prog_data(brw->vs.base.prog_data);<br>
> +#endif<br>
> +<br>
> brw_batch_emit(brw, GENX(3DSTATE_CLIP), clip) {<br>
> clip.StatisticsEnable = !brw->meta_in_progress;<br>
><br>
> @@ -1493,7 +1504,7 @@ genX(upload_clip_state)(struct brw_context *brw)<br>
><br>
> #if GEN_GEN < 8<br>
> clip.UserClipDistanceCullTestEnableBitmask =<br>
> - brw_vue_prog_data(brw->vs.base.prog_data)->cull_distance_mask;<br>
> + vue_prog_data->cull_distance_mask;<br>
><br>
> clip.ViewportZClipTestEnable = !(ctx->Transform.DepthClampNear &&<br>
> ctx->Transform.DepthClampFar);<br>
> @@ -1564,6 +1575,7 @@ static const struct brw_tracked_state genX(clip_state) = {<br>
> .brw = BRW_NEW_BLORP |<br>
> BRW_NEW_CONTEXT |<br>
> BRW_NEW_FS_PROG_DATA |<br>
> + BRW_NEW_TES_PROG_DATA |<br>
> BRW_NEW_GS_PROG_DATA |<br>
> BRW_NEW_VS_PROG_DATA |<br>
> BRW_NEW_META_IN_PROGRESS |<br>
> --<br>
I'm suspecting this (alongside 2/2 a second ago) is missing review?<br>
Perhaps the CI team can add it through the system to see if the flaky<br>
glescts tests improve?<br></blockquote><div><br></div><div>Yeah, I think Ken and I agreed that it is the right thing to do and fixes a bug but he never formally reviewed the patches.</div><div><br></div><div>--Jason<br></div></div></div>