Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

D3DPOOL_SCRATCH and threading

4: Adsense

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   

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



#2 Dawoodoz   Members   

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


"App". is an acronym and must always be followed by a dot.

https://en.oxforddictionaries.com/punctuation/punctuation-in-abbreviations


#3 miloszmaki   Members   

221
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   

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