thebigt at May 24th, 2010 01:28 — #1
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.
thebigt at May 24th, 2010 02:09 — #2
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.
oisyn at May 25th, 2010 05:10 — #3
So, for future reference, what was the instruction?
nick at May 25th, 2010 05:27 — #4
cvtps2dq, if my memory serves me right.
oisyn at May 25th, 2010 06:42 — #5
Alas, it was cvtps2pi