Sign in to follow this  

D3DPOOL_SCRATCH and threading

This topic is 1702 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,

 

I know it's not safe to create/lock D3D resources on a different thread. But I'm just curious if it's ok to do so with resources in D3DPOOL_SCRATCH ? It seems to work from what I've tested so far...

 

Example: I'm creating a texture in D3DPOOL_SCRATCH on a separate thread and locking it. Then I'm using the pixel data to perform some calculations and finally unlock and release the texture. I'm using D3DXCreateTextureFromFileEx for convenience and I'm not sure if it's safe here.

 

Any help of an expert would be really appreciated.

Share this post


Link to post
Share on other sites

If I had a lot of things to load, I would rather make a safe single threaded scheduler that load one resource per render and use placeholders until they are loaded. The threadsafe optimizations in Visual C++ are quite good anyway and can give more speed gain with functional programming.

Share this post


Link to post
Share on other sites

single threaded scheduler that load one resource per render

What do you mean? One resource per frame on the main thread ? I think it would cause long pauses which is unacceptable.

Anyway, the topic's question is still open...

Share this post


Link to post
Share on other sites

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