Jump to content
  • Advertisement
Sign in to follow this  
yk_cadcg

[solved] [dx10] CreateQuery() INVALIDARG error

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

only by this way can we get through!! MiscFlags=0 is omitted by sdk.
	ID3D10Query* pOcclusionQuery;
	D3D10_QUERY_DESC queryDesc; 
	queryDesc.MiscFlags = 0;
	queryDesc.Query = D3D10_QUERY_OCCLUSION;
	V(g_pd3dDevice->CreateQuery(&queryDesc, &pOcclusionQuery));
//// Hi, att, below. Why? Thanks!
	D3D10_QUERY_DESC queryDesc; 
	queryDesc.Query = D3D10_QUERY_OCCLUSION;
	UINT64 numberOfPixelsDrawn = 0;
	ID3D10Query* pOcclusionQuery = NULL;
	V(g_pd3dDevice->CreateQuery(&queryDesc, &pOcclusionQuery)); //INVALIDARG
[Edited by - yk_cadcg on May 15, 2007 2:30:39 AM]

Share this post


Link to post
Share on other sites
Advertisement
uuhh, what?

Maybe I didn't see your original post and you've since tagged it as [solved] but do consider that these forums are an ongoing archive of questions/comments/answers. Deleting/changing your original question once you've solved it doesn't help the community much [wink]

Quote:
MiscFlags=0 is omitted by sdk.
To be honest, that's your fault not theirs! If you omit that line then you're passing an unitilized chunk of data into the API. C/C++ doesn't zero out variables when they're declared. You'll see a lot of code calls ZeroMemory() for POD structures.

hth
Jack

Share this post


Link to post
Share on other sites
Thanks! I think you mean don't delete/change original post, just append to the thread as replys, right? ok.
My point for "MiscFlags=0 is omitted by sdk" is, MiscFlags has only 1 default value in sdk for choice: D3D10_QUERY_MISC_PREDICATEHINT
It was my fault to have missed the line "MiscFlags =D3D10_QUERY_MISC_PREDICATEHINT" in my error-leading code in my original post, but I did tried it. When I used it, error occurs. sdk doesn't mention the possibility to set it as 0. I set it as 0 only by chance. And I made a great guess.:)

Quote:
Original post by jollyjeffers
uuhh, what?

Maybe I didn't see your original post and you've since tagged it as [solved] but do consider that these forums are an ongoing archive of questions/comments/answers. Deleting/changing your original question once you've solved it doesn't help the community much [wink]

Quote:
MiscFlags=0 is omitted by sdk.
To be honest, that's your fault not theirs! If you omit that line then you're passing an unitilized chunk of data into the API. C/C++ doesn't zero out variables when they're declared. You'll see a lot of code calls ZeroMemory() for POD structures.

hth
Jack

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!