Sign in to follow this  

DirectX Querying

This topic is 4597 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

Hi all I was wondering if anyone anyone might be able to help me figure out the following query types: D3DQUERYTYPE_INTERFACETIMINGS D3DQUERYTYPE_BANDWIDTHTIMINGS Heres a short code example: *NOTE* m_pD3D_Device is my IDirect3DDevice9 HRESULT HRes = S_OK; LPDIRECT3DQUERY9 m_pGPU = NULL; HRes = m_pCApp->m_pD3D_Device->CreateQuery( D3DQUERYTYPE_INTERFACETIMINGS, &m_pGPU ); This snippet of code (and the equivalent code with BANDWIDTHTIMINGS as the query type) always returns D3DERR_NOTAVAILABLE which means my device doesn't support that query type. But have I ran my program on 5 different graphics cards (including a GeForce 6800U) and systems all of them return the same error. I wondering if anyone knew of something that might be causing my device to reject the query types? I should also mention that if I pass D3DQUERYTYPE_OCCLUSION everything works fine. Any thoughts or advice would be greatly appreciated, thanks in advance :)

Share this post


Link to post
Share on other sites
Unfortunately, most IHVs don't expose access to those query types in their retail drivers.

Driver support for things like those queries tends to be a chicken and egg thing - IHVs don't support those features because developers aren't asking for them; most developers aren't asking for those features because they've not had a chance to see how useful they are. There are usually much higher priority feature and bug items on their TODO lists.

Other queries such as D3DQUERYTYPE_VCACHE aren't always exposed due to the details being too sensitive or in some case the marketing for a chip not telling the whole story about it [wink]


If you're profiling, you could use NVPerfHud from nVidia which gets similar stats from a specially instrumented driver; there might even be a slim chance that the instrumented PerfHUD driver will expose D3DQUERYTYPE_INTERFACETIMINGS and D3DQUERYTYPE_BANDWIDTHTIMINGS. http://developer.nvidia.com/object/nvperfhud_home.html

ATI have a plugin for PIX for Windows, once again this indicates the possibility of the instrumentation being available in the driver, even if it's not exposed. http://www.ati.com/developer/atipix/


It's worth contacting the developer relations folks at the relevent IHVs - if only to let them know there are people who want to use those queries.

Share this post


Link to post
Share on other sites
Quote:
Original post by S1CA
Unfortunately, most IHVs don't expose access to those query types in their retail drivers.


I've never really understood why there isn't any query information in the D3D9 caps. If not all of the IHV's completely implement all of the functionality, then it should have a place in the caps structure. This would be a lot better than try ing to create each type of query to determine if it is available.

Share this post


Link to post
Share on other sites
Quote:
Original post by circlesoft
Quote:
Original post by S1CA
Unfortunately, most IHVs don't expose access to those query types in their retail drivers.


I've never really understood why there isn't any query information in the D3D9 caps. If not all of the IHV's completely implement all of the functionality, then it should have a place in the caps structure. This would be a lot better than try ing to create each type of query to determine if it is available.


Not sure.

But I suspect it's to allow new query types to be added easily in interim Direct3D versions without needing to add things to D3DCAPS9; in particular they can't add new members to that structure without breaking existing apps (memory overwrite problems).

Another reason could be that some query types only work with the debug runtime (VERTEXSTATS), and others are handled by D3D rather than the driver/hardware (RESOURCEMANAGER). In those cases, some queries aren't "device" things so probably shouldn't be flagged with "device" caps.

There are other things that don't have caps either, such as the permissable combinations of SetTextureStageState() operations; there would need to be a lot of very complex caps to expose that kind of information - thus ValidateDevice().

Share this post


Link to post
Share on other sites

This topic is 4597 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