Skip to content

CPU friendly texture loading / acquire texture multithreading? #1943

Answered by williamkrick
csyshing asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @csyshing,

MHWRender::MTextureManager::acquireTiledTexture() is not thread safe. In general none of Maya's API functions are thread safe, and this particular function is especially not thread safe. I don't think there is a way to safely load textures in parallel through Maya's API.

The crash occurs when trying to clean up some temporary targets created when loading the tiled texture.

A CPU friendly version of acquireTiledTexture() would remove a major source of thread-unsafety from the code, accessing the underlying graphics API, so it would be a step towards a multithreaded texture load. However, speculating about that hypothetical API is not really possible because of how different i…

Replies: 10 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by csyshing
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants