[Mesa-dev] [PATCH 1/2] i965/state: Set CullTestEnableBitmask based on the last geometry stage

Jason Ekstrand jason at jlekstrand.net
Thu Nov 8 16:08:06 UTC 2018


On Thu, Nov 8, 2018 at 9:34 AM Emil Velikov <emil.l.velikov at gmail.com>
wrote:

> On Sat, 27 Oct 2018 at 22:34, Jason Ekstrand <jason at jlekstrand.net> wrote:
> >
> > Instead of hard-coding it to look at the VS stage, look at whatever the
> > last geometry stage is.
> >
> > Cc: mesa-stable at lists.freedesktop.org
> > ---
> >  src/mesa/drivers/dri/i965/genX_state_upload.c | 14 +++++++++++++-
> >  1 file changed, 13 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c
> b/src/mesa/drivers/dri/i965/genX_state_upload.c
> > index 740cb0c4d2e..56fa5969725 100644
> > --- a/src/mesa/drivers/dri/i965/genX_state_upload.c
> > +++ b/src/mesa/drivers/dri/i965/genX_state_upload.c
> > @@ -1458,6 +1458,17 @@ genX(upload_clip_state)(struct brw_context *brw)
> >     struct brw_wm_prog_data *wm_prog_data =
> >        brw_wm_prog_data(brw->wm.base.prog_data);
> >
> > +#if GEN_GEN < 8
> > +   /* BRW_NEW_VS_PROG_DATA | BRW_NEW_TES_PROG_DATA |
> BRW_NEW_GS_PROG_DATA */
> > +   const struct brw_vue_prog_data *vue_prog_data;
> > +   if (brw->gs.base.prog_data)
> > +      vue_prog_data = brw_vue_prog_data(brw->gs.base.prog_data);
> > +   else if (brw->tes.base.prog_data)
> > +      vue_prog_data = brw_vue_prog_data(brw->tes.base.prog_data);
> > +   else
> > +      vue_prog_data = brw_vue_prog_data(brw->vs.base.prog_data);
> > +#endif
> > +
> >     brw_batch_emit(brw, GENX(3DSTATE_CLIP), clip) {
> >        clip.StatisticsEnable = !brw->meta_in_progress;
> >
> > @@ -1493,7 +1504,7 @@ genX(upload_clip_state)(struct brw_context *brw)
> >
> >  #if GEN_GEN < 8
> >        clip.UserClipDistanceCullTestEnableBitmask =
> > -         brw_vue_prog_data(brw->vs.base.prog_data)->cull_distance_mask;
> > +         vue_prog_data->cull_distance_mask;
> >
> >        clip.ViewportZClipTestEnable = !(ctx->Transform.DepthClampNear &&
> >                                         ctx->Transform.DepthClampFar);
> > @@ -1564,6 +1575,7 @@ static const struct brw_tracked_state
> genX(clip_state) = {
> >        .brw   = BRW_NEW_BLORP |
> >                 BRW_NEW_CONTEXT |
> >                 BRW_NEW_FS_PROG_DATA |
> > +               BRW_NEW_TES_PROG_DATA |
> >                 BRW_NEW_GS_PROG_DATA |
> >                 BRW_NEW_VS_PROG_DATA |
> >                 BRW_NEW_META_IN_PROGRESS |
> > --
> I'm suspecting this (alongside 2/2 a second ago) is missing review?
> Perhaps the CI team can add it through the system to see if the flaky
> glescts tests improve?
>

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.

--Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181108/110bd514/attachment.html>


More information about the mesa-dev mailing list