View Full Version : Speedig up OpenGL with Assembler...
04-24-2001, 10:05 PM
I've heard from a friend that there are some kind of assembler code that could speed up the drawing. In other words speeding up the FPS!
(There is no problems with running the app on my PIII -700 with a GeForce2 GTS, but I want to be able to run in on a "not so hot" graphic card)
Well, afaik, you won't be able to override parts of OpenGL with your own assembler routines... Anyway, most of the implementation goes through you gfx card drivers and I am pretty sure driver writers do their best to ensure speed...
The thing your friend might have meant could be the fact that you can use assembler to speed up the other parts of your program: I remember seeing someone posting a routine to calculate fast square roots using MMX. Much much much faster than sqrt....
I don't think you can optimize the rendering with assembler though...
04-24-2001, 11:20 PM
Of course you can not optimize OpenGL,but you
can optimize your critical code,transformations,culling,standart math lib,your matrix/vector lib etc using Intel's SSE(2), Amd's 3dnow! or even standart
FPU instruction set,but MMX... I'm not sure
but I think MMX is totaly obsolete.
04-24-2001, 11:47 PM
You should benchmark, which parts of your app needs the most processor time. If you have many calculations in your code, then assembler could be faster. If you have many triangles to display, then it relies to the gfx-driver.
04-25-2001, 01:08 AM
I think that the best optimisation today should be the use of T&L, no more CPU heavy transformations,heavy shading (attenuations etc..) , heavy vertice alimentation through the Bus and finally no more headaches with "Disco" SSE & 3DNOw implementations which cost a lot of workin time and just speed up a little bit software transformations (if your code is already nice optimised with classic FPU.. http://www.opengl.org/discussion_boards/ubb/frown.gif So what? only clipping should be done with CPU today so that's my point of view do your GPU work 100% of the rastertime and let your CPU compute other 'more' interesting things http://www.opengl.org/discussion_boards/ubb/wink.gif
Of course, it's only true for latest T&L based boards but it's the future architecture for all 3D boards!
04-25-2001, 01:25 AM
Do you have any experience programming assembler? If you don't you probably won't beat the compiler anyway, so you might as well go for algorithmic optimizations instead.
04-27-2001, 11:37 PM
Visit AMD's and Intel's homepages and download their optimized examples and add-ons. Why start messing with assembler again, when the code is already out there.
04-28-2001, 07:55 PM
> I'm not sure but I think MMX is totaly obsolete.
Actually, it's alive and kicking. It's very useful for things that need to work on 8, 16 or 32 bit integer quantities, such as sound code. Also, if you're planning on sending OpenGL 16-bit GLshort vertex coordinates, but need to operate on them ahead of time, MMX fits the bill.
MMX is also good for texture manipulation. Stuff like box filtering images for mip-mapping can really be sped up through MMX.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.