to save space,could I have lots of data in halfs instead of real4's?
are there already conversion macros/proc between them? or I need to do bitfiddling myself?
Search the forum for REAL2, there are many posts.
F16C is 16-bit floating point.
VCVTPH2PS ymm1, xmm2/m128
Nice find, InfiniteLoop :thumbsup:
I've put together a simple example (using plain Masm32 SDK code, see attached source), but I can't test it on my old cpu...
vcvtps2ph half, xmm0, 0 ; 4 x single to half-precision (https://www.felixcloutier.com/x86/vcvtps2ph); round to nearest even
vcvtph2ps xmm0, xmm1 ; 4 x half to single-precision (https://www.felixcloutier.com/x86/vcvtph2ps)
Thanks infiniteloop and jj :thumbsup:
I try 16 bit fixed point storage -> fimul constant also
Did my proggie work for you, daydreamer?
Seems to run here OK.
test 111.125000
test 222.250000
test 333.250000
test 444.500000
ok?
Quote from: jj2007 on May 20, 2021, 10:49:13 AM
Nice find, InfiniteLoop :thumbsup:
I've put together a simple example (using plain Masm32 SDK code, see attached source), but I can't test it on my old cpu...
vcvtps2ph half, xmm0, 0 ; 4 x single to half-precision (https://www.felixcloutier.com/x86/vcvtps2ph); round to nearest even
vcvtph2ps xmm0, xmm1 ; 4 x half to single-precision (https://www.felixcloutier.com/x86/vcvtph2ps)
test 111.125000
test 222.250000
test 333.250000
test 444.500000
ok?
Quote from: jj2007 on May 20, 2021, 09:09:41 PM
Did my proggie work for you, daydreamer?
it works
:thumbsup:
If I have lots of 3d object data, half's would be good to have smaller size data
But even word data = in millimeters might be good alternative
Quote from: jj2007 on May 20, 2021, 10:49:13 AM
... but I can't test it on my old cpu...
:biggrin: Wrong, JJ
You can use Intel SDE (I don't have AVX, pretty old machine):
test 111.125000
test 222.250000
test 333.250000
test 444.500000
ok?
Quote from: HSE on May 20, 2021, 11:45:59 PMYou can use Intel SDE
Never seen. Interesting, how does it work? I saw it's not such a fat download. Is it freeware? Does it really emulate the processor, in the sense: utterly slow but it works correctly?
Quote from: HSE on May 20, 2021, 11:45:59 PM
Quote from: jj2007 on May 20, 2021, 10:49:13 AM
... but I can't test it on my old cpu...
:biggrin: Wrong, JJ
You can use Intel SDE (I don't have AVX, pretty old machine):
test 111.125000
test 222.250000
test 333.250000
test 444.500000
ok?
Nice
But isn't it bigger chance old gpu have half caps,where I seen its used many years ago,and maybe some shader capable of conversion,or shader compiler running on cpu have caps. To convert half's <>floats?
Quote from: jj2007 on May 20, 2021, 11:51:46 PM
how does it work? I saw it's not such a fat download. Is it freeware?
I don't remember if requiere a free subscription, but is free for our use. Nidud posted a test (or something) a year ago.
There is a batch that open a command window. From the prompt you have a AVX machine :biggrin:
Also work a little batch:
path\sde -- halfprecision.exe
Quote from: daydreamer on May 21, 2021, 12:04:50 AM
But isn't it bigger chance old gpu have half caps,where I seen its used many years ago,and maybe some shader capable of conversion,or shader compiler running on cpu have caps. To convert half's <>floats?
Have you writed some code to show how that can be maked? That could be interesting :thumbsup:
Quote from: HSE on May 21, 2021, 12:35:39 AM
Quote from: daydreamer on May 21, 2021, 12:04:50 AM
But isn't it bigger chance old gpu have half caps,where I seen its used many years ago,and maybe some shader capable of conversion,or shader compiler running on cpu have caps. To convert half's <>floats?
Have you writed some code to show how that can be maked? That could be interesting :thumbsup:
Sorry, Marinus are the pixelshader expert not me