Jump to content

  • Log In with Google      Sign In   
  • Create Account


D3DPOOL_SCRATCH and threading


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 miloszmaki   Members   -  Reputation: 198

Like
0Likes
Like

Posted 03 April 2013 - 03:53 PM

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.



Sponsor:

#2 Dawoodoz   Members   -  Reputation: 294

Like
0Likes
Like

Posted 04 April 2013 - 05:53 AM

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.


My open source DirectX 10/11 graphics engine. https://sites.google.com/site/dawoodoz

"My design pattern is the simplest to understand. Everyone else is just too stupid to understand it."


#3 miloszmaki   Members   -  Reputation: 198

Like
0Likes
Like

Posted 05 April 2013 - 01:46 PM

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...



#4 miloszmaki   Members   -  Reputation: 198

Like
0Likes
Like

Posted 22 April 2013 - 01:50 AM

Any ideas?






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS