Sign in to follow this  
Diltsman

Removing Messages from ID3D10InfoQueue

Recommended Posts

Is there a way to remove just the top message from the ID3D10InfoQueue without removing all of the messages from the queue? For debugging, I'm trying to log all of the debug output. I'm using a seperate thread to get the messages and log them. The problem is figuring out how to avoid losing any of them. I'm not worried about calls to the ID3D10InfoQueue conflicting with calls to the ID3D10Device, because it has the thread-safe functionality enabled. I don't want to create a mutex to let one thread or the other use the object. It would be nice if I could just remove the message with index 0 from the queue rather than clearing all of them.

Share this post


Link to post
Share on other sites
Hey Danny,

Why are you threading this functionality? I'm guessing that reading from this queue is a very fast operation. Writing to disk is not a fast operation if done synchronously, which is (I imagine) why you want to do this in a different thread.

There is a much better way to accomplish this.

Share this post


Link to post
Share on other sites
Actually, my main reason for wanting to do this in a seperate thread is so that I don't have to have 10,000,000 calls to a logging function scattered through the code. IO performance isn't really an issue, since it is using a reference device and not hardware in debug mode.

Share this post


Link to post
Share on other sites
Then what's wrong with just running it once per frame, in your message loop? If you have it in a separate thread, that gives you no guarantees that it will be run more than once per frame. At least this way you'd get some consistency.

Share this post


Link to post
Share on other sites

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