[bug] jit_mat4_assign()

Jun 18, 2007 at 12:31pm

[bug] jit_mat4_assign()

I just tracked down what I believe is a nasty bug in jit_mat4_assign(). It
turns out that the source v02 gets copied to destination v02 and v03. The
other values are all right. Using jit_mat4_from_coords() to copy one matrix
to the other does work. See the example below.

Thijs

t_jit_mat4 v; // put some data in here
t_jit_mat4 dst;

// this will mess up
jit_mat4_assign(&dst, &v);
post(“assign v %f %f dst %f %f”, v->v02, v->v03, dst->v02, dst->v03);

// this won’t
jit_mat4_from_coords(&dst,
v->vals[0],v->vals[1],v->vals[2],v->vals[3],
v->vals[4],v->vals[5],v->vals[6],v->vals[7],
v->vals[8],v->vals[9],v->vals[10],v->vals[11],
v->vals[12],v->vals[13],v->vals[14],v->vals[15]);
post(“from_coords v %f %f dst %f %f”, v->v02, v->v03, dst->v02,
dst->v03);

#32509
Jun 18, 2007 at 12:49pm

Thanks, I can confirm, and have fixed the bug for the next release.

jb

Am 18.06.2007 um 14:31 schrieb Thijs Koerselman:

> I just tracked down what I believe is a nasty bug in jit_mat4_assign
> (). It
> turns out that the source v02 gets copied to destination v02 and
> v03. The
> other values are all right. Using jit_mat4_from_coords() to copy
> one matrix
> to the other does work. See the example below.
>
> Thijs
>
>
> t_jit_mat4 v; // put some data in here
> t_jit_mat4 dst;
>
>
> // this will mess up
> jit_mat4_assign(&dst, &v);
> post(“assign v %f %f dst %f %f”, v->v02, v->v03, dst->v02, dst-
> >v03);
>
> // this won’t
> jit_mat4_from_coords(&dst,
> v->vals[0],v->vals[1],v->vals[2],v->vals[3],
> v->vals[4],v->vals[5],v->vals[6],v->vals[7],
> v->vals[8],v->vals[9],v->vals[10],v->vals[11],
> v->vals[12],v->vals[13],v->vals[14],v->vals[15]);
> post(“from_coords v %f %f dst %f %f”, v->v02, v->v03, dst->v02,
> dst->v03);

#107108
Feb 1, 2008 at 5:56pm

Revisiting this thread since the issue still exists with the latest
incremental Jitter version on Windows. Am I missing something?

Thijs

On Jun 18, 2007 12:49 PM, Jeremy Bernstein wrote:

> Thanks, I can confirm, and have fixed the bug for the next release.
>
> jb
>
> Am 18.06.2007 um 14:31 schrieb Thijs Koerselman:
>
> > I just tracked down what I believe is a nasty bug in jit_mat4_assign
> > (). It
> > turns out that the source v02 gets copied to destination v02 and
> > v03. The
> > other values are all right. Using jit_mat4_from_coords() to copy
> > one matrix
> > to the other does work. See the example below.
> >
> > Thijs
> >
> >
> > t_jit_mat4 v; // put some data in here
> > t_jit_mat4 dst;
> >
> >
> > // this will mess up
> > jit_mat4_assign(&dst, &v);
> > post(“assign v %f %f dst %f %f”, v->v02, v->v03, dst->v02, dst-
> > >v03);
> >
> > // this won’t
> > jit_mat4_from_coords(&dst,
> > v->vals[0],v->vals[1],v->vals[2],v->vals[3],
> > v->vals[4],v->vals[5],v->vals[6],v->vals[7],
> > v->vals[8],v->vals[9],v->vals[10],v->vals[11],
> > v->vals[12],v->vals[13],v->vals[14],v->vals[15]);
> > post(“from_coords v %f %f dst %f %f”, v->v02, v->v03, dst->v02,
> > dst->v03);
>
>

#107109
Feb 1, 2008 at 7:27pm

moving this thread to jitter dev..

#107110

You must be logged in to reply to this topic.