I am implementing texturing in SSE and am coming up against a lack of packed float to int conversion instructions. The only remotely useful one I can find ( _mm_cvtss_si32 ) just converts the lowest float in the vector and writes the result out. However I want to convert all four elements and retain them in the xmm register to continue operating on them. Any suggestions would be appreciated. I am quite new to SSE programming and can't help feeling I am missing something obvious.
packed float to int rounding SSE
Started by thebigT, May 24 2010 05:28 AM
4 replies to this topic
#1
Posted 24 May 2010 - 05:28 AM
#2
Posted 24 May 2010 - 06:09 AM
The embarrassment of premature posting. I have found the instruction I was after, just wasn't in the section of the intrinsic reference guide I expected it to be in.
#3
Posted 25 May 2010 - 09:10 AM
So, for future reference, what was the instruction?
C++ addict
-
Currently working on: the 3D engine for Tomb Raider.
-
Currently working on: the 3D engine for Tomb Raider.
#4
Posted 25 May 2010 - 09:27 AM
cvtps2dq, if my memory serves me right.
#5
Posted 25 May 2010 - 10:42 AM
Alas, it was cvtps2pi
C++ addict
-
Currently working on: the 3D engine for Tomb Raider.
-
Currently working on: the 3D engine for Tomb Raider.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












