[Mesa-dev] [PATCH 1/2] draw: Duplicate TGSI tokens in draw_pipe_pstipple module.

Jose Fonseca jfonseca at vmware.com
Mon Mar 24 08:45:10 PDT 2014



----- Original Message -----
> On 03/24/2014 09:31 AM, jfonseca at vmware.com wrote:
> > From: José Fonseca <jfonseca at vmware.com>
> >
> > As done in draw_pipe_aaline and draw_pipe_aapoint modules.
> > ---
> >   src/gallium/auxiliary/draw/draw_pipe_pstipple.c | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
> > b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
> > index d7dcfdb..d216787 100644
> > --- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
> > +++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
> > @@ -673,7 +673,7 @@ pstip_create_fs_state(struct pipe_context *pipe,
> >      struct pstip_fragment_shader *pstipfs =
> >      CALLOC_STRUCT(pstip_fragment_shader);
> >
> >      if (pstipfs) {
> > -      pstipfs->state = *fs;
> > +      pstipfs->state.tokens = tgsi_dup_tokens(fs->tokens);
> >
> >         /* pass-through */
> >         pstipfs->driver_fs = pstip->driver_create_fs_state(pstip->pipe,
> >         fs);
> > @@ -707,6 +707,7 @@ pstip_delete_fs_state(struct pipe_context *pipe, void
> > *fs)
> >      if (pstipfs->pstip_fs)
> >         pstip->driver_delete_fs_state(pstip->pipe, pstipfs->pstip_fs);
> >
> > +   FREE((void*)pstipfs->state.tokens);
> >      FREE(pstipfs);
> >   }
> >
> >
> 
> Tag as a candidate for stable branches?

Yes, indeed.

> Reviewed-by: Brian Paul <brianp at vmware.com>

Thanks.

Jose


More information about the mesa-dev mailing list