From: Skybuck Flying on
Ok,

I just updated the example... it now uses the vcl/form/canvas for the hdc.

I also ran a little benchmark, problem size 16.000.000 iterations 200

Graphics card: GTX 7900.

Some formats didn't work... especially the R program seemed to hang or be
super slow... otherway, don't use those formats ;)

Conclusion: 16 bit floating point formats are twice as fast as 32 bit
floating point formats !

So use 16 bit floating point formats when possible ?!

Unfortunately this benchmark does not (yet?) include integers ?!?

I am curious how 16 bit integers in the shaders would perform ?! ;)

Updated source + batchfile will be available shortly ;)

Here are the results from benchmark.bat ;):

// BEGIN OF RESULTS (slightly modified to compensate for program
hangs/crashes, see aborted):

program started
TEXRECT - float_ARB - RGBA - 32
, N=16000000, numIter=200
CreateDC successfull.
CreateRenderingContext successfull.
MFLOP/s for N=16000000: 5829
ReleaseDC successfull.
program finished


program started
TEXRECT - float_ARB - RGBA - 16
, N=16000000, numIter=200
CreateDC successfull.
CreateRenderingContext successfull.
MFLOP/s for N=16000000: 11172
ReleaseDC successfull.
program finished


program started
TEXRECT - float_ARB - R - 32
, N=16000000, numIter=200
CreateDC successfull.
CreateRenderingContext successf
ABORTED


program started
TEXRECT - float_ATI - RGBA - 32
, N=16000000, numIter=200
CreateDC successfull.
CreateRenderingContext successfull.
MFLOP/s for N=16000000: 5792
ReleaseDC successfull.
program finished


program started
TEXRECT - float_ATI - RGBA - 16
, N=16000000, numIter=200
CreateDC successfull.
CreateRenderingContext successfull.
MFLOP/s for N=16000000: 11189
ReleaseDC successfull.
program finished

program started
TEXRECT - float_ATI - R - 32
, N=16000000, numIter=200
CreateDC successfull.
CreateRenderingContext successf
ABORTED

program started
TEXRECT - float_NV - RGBA - 32
, N=16000000, numIter=200
CreateDC successfull.
CreateRenderingContext successfull.
MFLOP/s for N=16000000: 5795
ReleaseDC successfull.
program finished

program started
TEXRECT - float_NV - RGBA - 16
, N=16000000, numIter=200
CreateDC successfull.
CreateRenderingContext successfull.
MFLOP/s for N=16000000: 11092
ReleaseDC successfull.
program finished

program started
TEXRECT - float_NV - R - 32
, N=16000000, numIter=200
CreateDC successfull.
CreateRenderingContext successfull.
MFLOP/s for N=16000000: 5641
ReleaseDC successfull.
program finished

program started
tex2D - float_ARB - RGBA - 32
, N=16000000, numIter=200
CreateDC successfull.
CreateRenderingContext successfull.
MFLOP/s for N=16000000: 5801
ReleaseDC successfull.
program finished

program started
tex2D - float_ARB - RGBA - 16
, N=16000000, numIter=200
CreateDC successfull.
CreateRenderingContext successfull.
MFLOP/s for N=16000000: 11110
ReleaseDC successfull.
program finished

program started
tex2D - float_ARB - R - 32
, N=16000000, numIter=200
CreateDC successfull.
CreateRenderingContext successful
ABORTED

program started
tex2D - float_ATI - RGBA - 32
, N=16000000, numIter=200
CreateDC successfull.
CreateRenderingContext successfull.
MFLOP/s for N=16000000: 5801
ReleaseDC successfull.
program finished

program started
tex2D - float_ATI - RGBA - 16
, N=16000000, numIter=200
CreateDC successfull.
CreateRenderingContext successfull.
MFLOP/s for N=16000000: 11165
ReleaseDC successfull.
program finished

program started
tex2D - float_ATI - R - 32
, N=16000000, numIter=200
CreateDC successfull.
CreateRenderingContext successful
ABORTED

program started
tex2D - float_NV - RGBA - 32
, N=16000000, numIter=200
CreateDC successfull.
CreateRenderingContext successf
ABORTED

program started
tex2D - float_NV - RGBA - 16
, N=16000000, numIter=200
CreateDC successfull.
CreateRenderingContext successf
ABORTED

program started
tex2D - float_NV - R - 32
, N=16000000, numIter=200
CreateDC successfull.
CreateRenderingContext successfull
ABORTED

// END OF RESULTS

Bye,
Skybuck.