[Mesa-dev] [PATCH 4/6] glsl: Make a little tracking class for emitting IR lists.
Eric Anholt
eric at anholt.net
Fri Apr 13 17:04:46 PDT 2012
On Mon, 09 Apr 2012 23:29:09 -0700, Kenneth Graunke <kenneth at whitecape.org> wrote:
> On 04/09/2012 02:22 PM, Eric Anholt wrote:
> > @@ -1346,11 +1325,10 @@ emit_instructions(struct texenv_fragment_program *p)
> > static struct gl_shader_program *
> > create_new_program(struct gl_context *ctx, struct state_key *key)
> > {
> > - struct texenv_fragment_program p;
> > + texenv_fragment_program p;
> > unsigned int unit;
> > _mesa_glsl_parse_state *state;
> >
> > - memset(&p, 0, sizeof(p));
>
> Clearly you can't continue doing this memset, but I'm also wary of just
> removing it. Nothing depends on these fields being init'd to zero?
>
> If they do, it's probably cleanest to add a constructor. Some of this
> code could probably go there.
>
> Assuming the memset was just for paranoia:
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
I went back and reviewed this inspection and by valgrind, and I'v pushed
the series. Thanks for the review!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120413/dbb321c9/attachment.pgp>
More information about the mesa-dev
mailing list