Help about gte_sqr12()

Graphic based area of development (Graphics Processing Unit), including the Geometry Transform Engine (GTE), TIM, STR (MDEC), etc.
Post Reply
Donator & Supporter
Donator & Supporter
Posts: 18
Joined: Oct 15, 2020

Help about gte_sqr12()

Post by masmorra » August 25th, 2021, 6:57 am

Hello guys, can you help me with some gte stuff?

So it's about the gte_sqr12 instruction, when I load my vector input, I only can use number until 8<<12 (32768) because the register utilized by gte_sqr12() is only 16bits. I'm doing something wrong or It was doing exactly what is supposed to do?

Code: Select all

VECTOR myinput{8<<12,3<<12,4<<12};
//load my vector to IR1,IR2,IR3           16bit Accumulator (Vector)
//store to out vector from MAC1,MAC2,MAC3        32bit Maths Accumulators (Vector)
//out.vx prints 262144 = (8*8)<<12
//if the x from the vector is 9, the return is 200704, like (-7 * -7) << 12

If I use thegte_sqr0() the output begins to differ when the numbers are bigger, because I need to shit << 12 the results

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest