[bug] jit_mat4_assign()


    Jun 18 2007 | 12:31 pm
    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);

    • Jun 18 2007 | 12:49 pm
      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);
    • Feb 01 2008 | 5:56 pm
      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); > >
    • Feb 01 2008 | 7:27 pm
      moving this thread to jitter dev..