Hyperthreading and CPU-based T&L

I'm testing our game on a hyper-threading P5 with an Intel "rasterize-only" graphics chip. When I bring up the task manager, I only get 50% cpu utilization as the game is only really using a single thread.

However, it seems like there should be a way to have the DirectX driver do its vertex processing in its own thread. Is there a good way to accomplish this Since the CPU has to do all the transform and lighting on this type of system, it would be nice to fully use the CPU.



Answer this question

Hyperthreading and CPU-based T&L

  • hardday

    There is no way to tell DirectX to thread the transformation. I, too, have felt that this would be a good idea in some circumstances.

    On Hyperthreading CPUs, the fight for cache resources and CPU execution units is actually bad enough that threading likely wouldn't be a net gain. However, on dual-core CPUs, it seems as if it'd be an obvious win. Right now, you have to create the device (and issue commands) on a separate thread yourself to make that happen.

    Even with hardware tranform cards, driver and API overhead is sometimes pretty high; especially if you're using effects and changing parameters a lot. In that case, you're probably better off threading at the application level anyway!


  • Galan

    Thanks... but I don't have a question with threading/hyperthreading in general... I'd like to know specifically if the driver / DirectX can easliy be made to take advantage of it. Right now it seems like the driver and DirextX do all their processing in the context of the caller's thread whereas it would be nice to let them do work on the "other" processor.

    I suppose I could put all calls to DirextX into a separate thread, but it seems like this should be handled at a lower level... like when the command FIFO is issued to the transformation engine.


  • Rags_Bhat

    You can take a look at these articles that explain on how to take advantage of hyperthreading as a developer.

    http://zone.ni.com/devzone/conceptd.nsf/webmain/01F2E634710FB8E486256E2900586D41
    http://www.developers.net/intelshowcase/view/759

    I hope this helps.
    Take care.


  • Hyperthreading and CPU-based T&L