Very low framerate using REF device

Started by
8 comments, last by FoxHunter2 19 years, 6 months ago
Hi, When rendering into four windows using HAL device, my fps is something over 400, if I use REF device instead, i get framerates around 1 fps!! I render a model with 600 verts in only one of the four windows, using DrawIndexedPrimitiveUP(). It is rendered correctly in both cases so I suppose my multiple swap chain technique is correct. My question is: Is REF device really SO slow or might be something else wrong with my code? Presentation parameters and creation of the device (I use D3D8): ZeroMemory(&this->m_stPresent, sizeof(D3DPRESENT_PARAMETERS)); this->m_stPresent.BackBufferWidth = 0; this->m_stPresent.BackBufferHeight = 0; this->m_stPresent.BackBufferFormat = D3DFMT_X8R8G8B8; this->m_stPresent.BackBufferCount = 1; this->m_stPresent.MultiSampleType = D3DMULTISAMPLE_NONE; this->m_stPresent.SwapEffect = D3DSWAPEFFECT_DISCARD; this->m_stPresent.hDeviceWindow = hDevWindow; this->m_stPresent.Windowed = true; this->m_stPresent.AutoDepthStencilFormat = D3DFMT_UNKNOWN; this->m_stPresent.EnableAutoDepthStencil = false; this->m_stPresent.Flags = D3DPRESENTFLAG_LOCKABLE_BACKBUFFER; HRESULT hResult = this->m_pcD3D->CreateDevice(0, D3DDEVTYPE_REF, NULL, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &this->m_stPresent, &this->m_pcDevice);
Advertisement
Quote:
My question is: Is REF device really SO slow or might be something else wrong with my code?


Yes, it is slow.
Yes, the REF device is really that slow. It's only reason for existence is accurancy, not performance. You'd only use it during production of your 3D program to test features not available on your graphics card (e.g. advanced pixel shaders).
The reference device is designed as an accurate software rasterizer - not a high-performance one. It is very common that hardware operations are orders of magnitude faster than equivalent operations performed in the ref mode.

The real benefit of ref device is that you can test d3d features not yet implemented in hardware.

EDIT: I'm too slow [smile]

Niko Suni

Ok, thanx!
Quote:Original post by BlackGhost
Yes, the REF device is really that slow. It's only reason for existence is accurancy, not performance. You'd only use it during production of your 3D program to test features not available on your graphics card (e.g. advanced pixel shaders).


Yep. It's worth pointing out that "accuracy" when referring to the D3D REF device means "accurately follows the Direct3D specification" rather than the rendered output being more accurate than with hardware (in a film renderer sense).

That's the other main use for the REF device - if you suspect your hardware or driver for your hardware isn't conforming to the D3D standard and you've verified that it's definately not a device cap you've missed, then if it works with REF, then that's an indication of broken hardware or a broken driver.

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

Quote:Original post by BlackGhost
Yes, the REF device is really that slow. It's only reason for existence is accurancy, not performance. You'd only use it during production of your 3D program to test features not available on your graphics card (e.g. advanced pixel shaders).


Why would anybody want to test shaders with the REF device= I mean, when the scene is rendered with about 0.1 to 1 FPS you don't actually see the shaders at their full glance.
I tried to view some HDR examples on my GF4 using the REF device, but due to the icredible slow framerate I couldn't see anything proper at all.
Quote:Original post by FoxHunter2
Quote:Original post by BlackGhost
Yes, the REF device is really that slow. It's only reason for existence is accurancy, not performance. You'd only use it during production of your 3D program to test features not available on your graphics card (e.g. advanced pixel shaders).


Why would anybody want to test shaders with the REF device= I mean, when the scene is rendered with about 0.1 to 1 FPS you don't actually see the shaders at their full glance.
I tried to view some HDR examples on my GF4 using the REF device, but due to the icredible slow framerate I couldn't see anything proper at all.


You wouldn't see anything without the reference device in this case, proper or not, since your card does not support true HDR but reference device does. That's why [smile]

Niko Suni

You could always render a sequence of frames, saving each one to a file, then compile this into an animation to watch at a decent frame rate.
Quote:Original post by Nik02
You wouldn't see anything without the reference device in this case, proper or not, since your card does not support true HDR but reference device does. That's why [smile]


I know. But what I saw was rendered so incredibly slow that it wasn't even worth to test using the REF device.

@DBX: yeah, sure that's possible, but I'd still be an exhausting and cumbersome work.

Edited by Coder: Fix quote

[Edited by - Coder on September 23, 2004 10:55:40 PM]

This topic is closed to new replies.

Advertisement