Forcing everything on the GPU

Started by
4 comments, last by okonomiyaki 21 years, 8 months ago
I wanted to clear this up. We all want as much as possible to be done on the GPU, correct? Meaning that whatever can be hardware accelerated, you want to use that feature on the hardware. How can I be sure that I''m sending as much as possible to the GPU instead of the CPU? Is there anything more I can do than just change the flag VERTEX_SOFTWARE_PROCESSING to VERTEX_HARDWARE_PROCESSING and what exactly does changing that flag do? Does it switch between the REF and HAL rasterizers? The reason that I''m asking is because I got my Geforce4 a little bit ago and I''m having some big problems converting my app which ran good on a VOODOO 3 (!!) . Simply when I changed the flag mentioned earlier when creating the D3D device to ''hardware'', all I got were green and pink flashing screens. Any ideas? Thanks!
Advertisement
I don''t think your code is the problem. Try to update your GFX drivers.

VERTEX_SOFTWARE_PROCESSING works on all cards

VERTEX_HARDWARE_PROCESSING works on some cards.. GeForce 2-3-4 etc..

Since your GeForce 4 behaves strange while your using HARDWARE VERTEX PROCESSING, that might be a driver problem.
red (pink) & green flashing screens is usually the D3D runtime trying to tell you that there is an error in your code.

Look at the debug output and it''ll tell you what they are.

Some things to check:

1. Hardware vertex processing usually has more limitations than software vertex processing. An example is you can only have 8 lights per primitive in hardware. Check the caps!

2. Wherever a buffer (vertex/index) is created, for software vertex processing you''ll have a flag at the end which specifies that buffer is intended for that. You should remove the flag if using hardware vertex processing.


--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

I''ll definitely check the debug output. Thanks for reminding me. It''s on my new computer and I hadn''t set the d3d debug up really so that wasn''t my first inclination. I''m sure that''ll tell me exactly what''s wrong once I get it set up!
I did remove those flags from the buffer creation.
And I''m pretty sure I have the latest driver because we just installed the card a few days ago, and went online to download the drivers. I''ll check the debug runtime though, that seems to be the only way to discover my problem.
(I wish I could right now, but my computer''s at my brother''s house -_- )
Anyway, I''ll look into it more when I get the chance. Thanks guys!
Changing just the device creation flags is not enough, have you also changed the flags for creating the vertex buffers?
Yep I had thought that I did. But.. I didn''t change it in one of my classes that created a vertex buffer. I changed that, and then fiddled with my flexible vertex format for my stream (I think it was formatted wrong in my last change to the program) and it worked. Although a lot slower than expected.. but, it must have been that one flag? I''m not sure, but at least I''m getting an image.
Thanks again!

This topic is closed to new replies.

Advertisement