Welcome, Unregistered.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Reply
Old 01-Sep-2004, 22:27   #1
Hellbinder
Naughty Boy!
 
Join Date: Feb 2002
Posts: 1,444
Default Question about ATi/Nvidia support of 64/SIMD etc..

This is a Driver related Question.. but Its more of a serious overall performance minded Question than specifically about drivers.. so i am putting it in this forum.

I just Got a Laptop with an Athlon 64 and it has a host of special instructions it can support simultaniously.

3DNow! Technology:
Enhanced 3DNow! Technology:
3DNow! Professional Technology:
IA MMX Technology:
IA Streaming SIMD Extensions:
IA SSE 2:

On top of its 64bit capabilities.

I know that back in the day there was a push to get SEE and 3dnow support into drivers. But.. has that continued to today? Are Drivers really taking advantage of all these additional CPU capabilites available today? What are the types of benefits could be seen from fully utilizing these featues if any? Where would the proper and perhaps innovative use of the above bennefit modern 3d rendering?

Which brings me to my second topic Question.

Can Drivers be programed to directly address the CPU and not need a 64bit OS to get some additional speed/processing bennefits?

Any ATi or Nvidia guys out there.. or any Devs in the know.. I would appriciate your views on this.
Hellbinder is offline   Reply With Quote
Old 01-Sep-2004, 22:39   #2
olivier
Junior Member
 
Join Date: Aug 2002
Location: Trois-Rivieres, Quebec
Posts: 78
Send a message via MSN to olivier
Default

i know than the driver cannot bypass the OS.

For SSE and 3dnow ... i remember than in old ati driver you could disable the optimisation with a register key ... so you can try to benchmark with and without it
olivier is offline   Reply With Quote
Old 01-Sep-2004, 22:49   #3
Guden Oden
Senior Member
 
Join Date: Dec 2003
Posts: 6,201
Default Re: Question about ATi/Nvidia support of 64/SIMD etc..

Quote:
Originally Posted by Hellbinder
Can Drivers be programed to directly address the CPU and not need a 64bit OS to get some additional speed/processing bennefits?
"Directly access the CPU"? Um, the CPU is what runs the driver, so naturally the driver is "accessing" it.
__________________
Top one reason why capital punishment is immoral and wrong:
You can release an innocently convicted man from jail,
but you cannot release an innocently convicted man from death.
Guden Oden is offline   Reply With Quote
Old 02-Sep-2004, 03:28   #4
Pete
Moderate Nuisance
 
Join Date: Feb 2002
Posts: 4,653
Default

It seems more accurate to say it the other way around--the driver "runs" the CPU. Or, better yet, it runs on the CPU. Even more acurately, it runs on the CPU via the OS.

I doubt MS will allow ATi/nV/world direct access to the CPU. That sounds like an invitation to crashes and virii.

Of course, I know next to nothing about OS or driver dev, so I'm ready to be proven hilariously wrong.
Pete is offline   Reply With Quote
Old 02-Sep-2004, 04:11   #5
Humus
Crazy coder
 
Join Date: Feb 2002
Location: Stockholm, Sweden
Posts: 3,216
Send a message via ICQ to Humus Send a message via MSN to Humus
Default

I'm no driver guy either, and I haven't read up on this subject in a long time so some of this may not be 100%, but there's this thing called rings in which the CPU can run. On x86 you have rings 0-3 IIRC, and normal applications run in ring 3 (limited permissions), while the OS is running in ring 0 (unlimited permissions). A process running in ring 3 trying to switch to 64bit execution mode would most likely cause an interrupt and control be switched over to the OS which would simply terminate the process. A driver can do a lot more than a regular app though. IIRC rings 1 and 2 are never used under Windows, so that would mean a driver runs in ring 0 (at least the kernel mode part of it). So I guess it would be possible for the driver to switch to 64bit mode. But if it would attempt anything such it better ensure there's no interrupts while it's using it and be sure to restore the state to whatever it was when it's done.
__________________
[ Visit my site ]
I speak for myself and only myself.
Humus is offline   Reply With Quote
Old 02-Sep-2004, 04:56   #6
Reverend
Naughty Boy!
 
Join Date: Jan 2002
Posts: 3,266
Default

SSE and 3DNow driver support is one thing (and there isn't much that needs to be done in drivers wrt SSE/3DNow) ... software support is another, and it's much more important.
__________________
Reverend
Dev Anon : Best game ever? Hmm... you mean other than anything from us? (2005)
Reverend is offline   Reply With Quote
Old 02-Sep-2004, 20:14   #7
Dave B(TotalVR)
Member
 
Join Date: Feb 2002
Location: Essex, UK (not far from IMGTEC:)
Posts: 491
Send a message via ICQ to Dave B(TotalVR)
Default

Humus, I dont see why a processor could not be set to queue interrupts whilst a temporary mode switch is in effect, perhaps even alert the 64 bit code to relinquish processor control and switch mode back before any delay is imposed on the interrupt being addressed.
__________________
The world is over and I realised it was all in my head...
Webmaster at TotalVR
Dave B(TotalVR) is offline   Reply With Quote
Old 02-Sep-2004, 21:03   #8
Pete
Moderate Nuisance
 
Join Date: Feb 2002
Posts: 4,653
Default

But is it possible for a driver to fully exploit A64's "64-bitness" without a 64-bit-aware OS? I'm under the impression it's not possible. I've read about Window's rings, but the rings are still limited by the OS interms of what CPU features they can expose, no?
Pete is offline   Reply With Quote
Old 02-Sep-2004, 21:15   #9
Chalnoth
 
Join Date: May 2002
Location: New York, NY
Posts: 12,678
Default

Since most applications are multithreaded, it would seem to me to be problematic for anything but the OS to use 64-bit extensions.
Chalnoth is offline   Reply With Quote
Old 03-Sep-2004, 00:54   #10
Humus
Crazy coder
 
Join Date: Feb 2002
Location: Stockholm, Sweden
Posts: 3,216
Send a message via ICQ to Humus Send a message via MSN to Humus
Default

Quote:
Originally Posted by Dave B(TotalVR)
Humus, I dont see why a processor could not be set to queue interrupts whilst a temporary mode switch is in effect, perhaps even alert the 64 bit code to relinquish processor control and switch mode back before any delay is imposed on the interrupt being addressed.
I guess it could, but I'm not sure how useful that would be. And more importantly, I don't think x86 has support for it. There are instructions to enable and disable interrupts (STI/CLI), so any code running in ring 0 can guarantee uninterrupted execution if it wants to temporarily switch to 64bit mode.
__________________
[ Visit my site ]
I speak for myself and only myself.
Humus is offline   Reply With Quote
Old 03-Sep-2004, 01:09   #11
Chalnoth
 
Join Date: May 2002
Location: New York, NY
Posts: 12,678
Default

Hrm, but that still seems like it would be problematic. For how long would you actually want to have a driver run uninterrupted? The best-case for a video driver would be that it be a thin layer between the software and the GPU. I wouldn't think you'd want to spend enough time to make the switch worth it.
Chalnoth is offline   Reply With Quote
Old 03-Sep-2004, 18:18   #12
Colourless
Monochrome wench
 
Join Date: Feb 2002
Location: Somewhere in outback South Australia
Posts: 1,257
Send a message via ICQ to Colourless Send a message via MSN to Colourless
Default

I doubt that any driver that attempts to change the execution mode of the CPU would EVER get approval from Microsoft.
__________________
-Colourless

D3D FSAA Viewer 5.4
Words by Cat - Truely Intelligent Viewing
Colourless is offline   Reply With Quote
Old 04-Sep-2004, 01:23   #13
Humus
Crazy coder
 
Join Date: Feb 2002
Location: Stockholm, Sweden
Posts: 3,216
Send a message via ICQ to Humus Send a message via MSN to Humus
Default

Quote:
Originally Posted by Chalnoth
Hrm, but that still seems like it would be problematic. For how long would you actually want to have a driver run uninterrupted? The best-case for a video driver would be that it be a thin layer between the software and the GPU. I wouldn't think you'd want to spend enough time to make the switch worth it.
Well, if you limit it to shorter than a regular thread timeslice I don't think there will be any problems. I don't know the length of a thread timeslice in windows, but I don't think it's extremely granular. You'd probably have enough time to do something useful. I don't know exactly what tasks 64bit mode would be beneficial for though.
__________________
[ Visit my site ]
I speak for myself and only myself.
Humus is offline   Reply With Quote
Old 04-Sep-2004, 01:24   #14
Humus
Crazy coder
 
Join Date: Feb 2002
Location: Stockholm, Sweden
Posts: 3,216
Send a message via ICQ to Humus Send a message via MSN to Humus
Default

Quote:
Originally Posted by Colourless
I doubt that any driver that attempts to change the execution mode of the CPU would EVER get approval from Microsoft.
But how would they know, except by disassembling the binary and analysing it?
__________________
[ Visit my site ]
I speak for myself and only myself.
Humus is offline   Reply With Quote
Old 04-Sep-2004, 02:54   #15
Chalnoth
 
Join Date: May 2002
Location: New York, NY
Posts: 12,678
Default

Quote:
Originally Posted by Humus
Well, if you limit it to shorter than a regular thread timeslice I don't think there will be any problems. I don't know the length of a thread timeslice in windows, but I don't think it's extremely granular. You'd probably have enough time to do something useful. I don't know exactly what tasks 64bit mode would be beneficial for though.
Except there's probably a penalty for switching modes.

x86-64 should be good for some FP-intensive calculating tasks that require many registers for optimal operation (more registers than x86 offers). I don't know what in a driver would require this, though...
Chalnoth is offline   Reply With Quote
Old 04-Sep-2004, 02:57   #16
Chalnoth
 
Join Date: May 2002
Location: New York, NY
Posts: 12,678
Default

Quote:
Originally Posted by Humus
Quote:
Originally Posted by Colourless
I doubt that any driver that attempts to change the execution mode of the CPU would EVER get approval from Microsoft.
But how would they know, except by disassembling the binary and analysing it?
Run it on a virtual machine?
Chalnoth is offline   Reply With Quote
Old 04-Sep-2004, 07:33   #17
pcchen
Moderator
 
Join Date: Feb 2002
Location: Taiwan
Posts: 2,348
Default

Switch to 64 bits mode in driver can be very expensive. You need to set up your own page tables and segments, while maintains the connection to the outer world (the API/programs accessing the driver). Using STI/CLI to disable interrupt will practically disable the context switch mechanism of the OS, and it can be problematic. Furthermore, even STI/CLI can not disable NMI (which is, of course, very rare and mostly generated by hardware error).
pcchen is offline   Reply With Quote
Old 05-Sep-2004, 09:23   #18
Rolf N
Recurring Membmare
 
Join Date: Aug 2003
Location: yes
Posts: 2,494
Default

Quote:
Originally Posted by olivier
i know than the driver cannot bypass the OS.

For SSE and 3dnow ... i remember than in old ati driver you could disable the optimisation with a register key ... so you can try to benchmark with and without it
3DNow! and SSE are most beneficial for emulating fixed function T&L or vertex shaders.

This was a pretty big deal back when the cards didn't have hardware for that. Nowadays I don't think it will matter much. Besides, even if we're talking about cards that don't have vertex shader hardware, newer DirectX Graphics versions have their own software vertex processing built-in (which heavily uses 3DNow!/SSE I guess), and it may be sufficient to just rely on that.

I think the card that currently benefits the most from SIMD-Code in the driver is the Geforce 4MX. NVIDIA offers full emulation of ARB_vertex_program for all their cards (even on the TNT2) in OpenGL. The Gf4MX is unique however, because it supposedly has "half" a vertex shader.

MMX is very useful for texture processing, shifting and replicating bits, and mipmap generation. This is mostly OpenGL related, because of its flexible (read: complex to implement) pack/unpack functionality, and because there's no common runtime that handles it. The driver must implement these things itself.

Another thing that may be more universally useful is that SSE has instructions for prefetching and explicitly uncached writes (3DNow! only provides prefetching). These are very nice things for moving data around, and drivers do that all the time. It's also very easy to exploit. Just write a few specialized memcpy replacements, and you're done.

(btw the original Athlon [which lacks full SSE support] understands and executes these prefetch and uncached write "SSE" instructions; this was marketed under the "3DNow! enhanced" umbrella)


@Topic,
I don't think there's any useful way to escape from "Legacy mode" for driver code. It may be possible, but even if it is it's a tremendously complex endeavour, and there will be massive performance penalties for mode switching. Before you can execute any code in 64 Bit mode, you need to have the entire execution environment working correctly. You must be able to redirect all interrupts to their respective 32 Bit handlers. You must take care of segment descriptors and all that dirty stuff, because a 32 Bit OS just can't do that for you anymore.

If you want 64 Bit drivers, you'll most certainly need a 64 Bit OS.

If you want to find out if there's any way at all (I'm still not sure), I suggest you start here. This PDF looks promising.
Rolf N is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VIA Announces Chipset Support for AMD Dual-Core Technology Unknown Soldier Hardware & Software Talk 0 21-Apr-2005 14:55
CPU support mobo question AlStrong Hardware & Software Talk 7 24-Feb-2005 19:34
Memory card support in new consoles gleemax Console Technology 6 29-Jan-2005 22:31
some GDC 2004 D3D papers are up at ati developer page tEd 3D & Semiconductor Industry 46 28-Mar-2004 00:05
NV30 MPEG-2 Decode Support? CMKRNL 3D Architectures & Chips 13 01-Aug-2002 06:18


All times are GMT +1. The time now is 07:17.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.