Taking advantage of the GPU

Started by
13 comments, last by okonomiyaki 21 years, 8 months ago
Yeah, I''m using DX 8.1 with vertex buffers. I guess my program runs fine except for the fact that I''m telling the CPU to change a texture too often. I can think of a few ways around this.. (maybe even learn pixel shaders.. agh!) and I''m hoping that my program will shoot a lot higher than 17 fps. thanks guys
Advertisement
quote:
I would imagine that a Pentium 4 is much faster than a GeForce4 at certain things. The point in a GPU is not to speed up calculations, just to share some of the work. So if your program is only graphical, its not much helped by a GPU, because transformation and lighting is of similar speed on a CPU. The idea is to use the GPU for graphics, and the CPU for physics, AI, etc.


Hm, why do mostly anonymous posters post such rubbish?

Lets see - yes, a PIFV is much faster than a PF 4 at certain things. Like at Disc IO, or at executing Win32 programs.

For everything graphics relates, the GPU beats the hell out of a PIV. Relying onto the PIV is exactly why you are CPU bound.

"T&L is of similar speed on a CPU" - where do you guy live? T&L is exactly where the GF4 is going to beat the HELL out of yyour PIV. The number of transformations that can be done on a GF4''s Transformation unit is WAY higher than the number of transformations you can do on a PIV - specialised hardware beating generic hardware.


Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)
RegardsThomas TomiczekTHONA Consulting Ltd.(Microsoft MVP C#/.NET)
thona is right, i think even a geforce 256 can transform more than a p4. think about all the current games, if you put them in hardware tl they are MUCH faster than software, even on slow tl cards.
quote:Original post by okonomiyaki
Yeah, I''m using DX 8.1 with vertex buffers. I guess my program runs fine except for the fact that I''m telling the CPU to change a texture too often. I can think of a few ways around this.. (maybe even learn pixel shaders.. agh!) and I''m hoping that my program will shoot a lot higher than 17 fps. thanks guys


I guess it''s the fact you are generating a texture every frame is the problem. What size is this texture and what is it used for? Can you reduce the size? Can you update it every 2nd frame? Can you optimise the code that generates the texture? I don''t know much about dynamic textures, but is it possible that it might be faster writing to a texture in System memory if you''re doing every pixel?


Read about my game, project #1

NEW: see my progress from last week - join the mailing list to get this and other updates every week!


John 3:16
You guys are right.. doohg, it''s a 1024x1024 texture for my sky The resolution is pretty important. BUT I have found that I''ve achieved amazing results (170 fps!) by transforming the texture on the hardware with texturestagestates! Yes, a geforce256+ could easily beat a P4 in graphics. I''ve found that out first hand.

This topic is closed to new replies.

Advertisement