Sign in to follow this  

Difference between SW and REF

This topic is 2337 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Assuming DX9: The REF device is a reference device, it implements all the features of the DX9 API, and is usually used when you want to check for a driver bug (If the HAL device and REF devices give different output, REF is always correct, so that could indicate a driver bug), or when you want to develop a feature that your graphics card doesn't support (E.g. if you're trying to write an app that uses pixel shaders and you only have a GeForce 2 in your development PC). It's also extremely slow - you can expect several seconds per frame rather than frames per second.

The SW device is a pluggable software renderer, usually used for things like servers that don't have a graphics card, or are supporting multiple sessions and don't have an active display to render to. Generally you don't use this unless you're doing something fairly specialist.

The HAL device is the "normal" device you'll be using, it represents the hardware itself, and is implemented in the video drivers provided by NVidia / ATI/AMD, etc.

Share this post


Link to post
Share on other sites
The ref device is an emulator that implements all features of the D3D specification (excluding some exotic resource formats) and does so accurately as opposed to being fast about it. It is only available when the SDK is installed on the target machine, so you cannot (by far) assume that the user can run this device type.

The sw device type is not well supported for application programmers using D3D9. The purpose of this device type is/was that the user provides his/her own software driver handle that the D3D layer subsequently calls when D3D device methods are called. [s]I don't remember whether or not there is a direct way to provide the driver handle from within the public interfaces of D3D9.[/s] The software driver handle can be provided by calling the IDirect3D9::RegisterSoftwareDevice method.

The functionality of the sw device type would suit driver development (enabling custom emulation of actual driver functionality in user mode), whereas the ref device is best for debugging and verification of applications that use D3D.

EDIT: steve was faster :)

Share this post


Link to post
Share on other sites

This topic is 2337 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this