[FEATURE REQUEST] OIIO::ImageBufAlgo::make_texture doesn't take an nthreads argument #4254
Labels
bug
Crash or wrong behavior of an existing feature.
enhancement
Improvement of existing/working features.
feature request
good first issue
Good one-day project for beginners without much knowledge of the code base.
https://openimageio.readthedocs.io/en/stable/imagebufalgo.html says:
All ImageBufAlgo functions take an optional nthreads parameter that signifies the maximum number of threads to use to parallelize the operation. The default value for nthreads is 0, which signifies that the number of thread should be the OIIO global default set by OIIO::attribute() (see Section [Global Attributes](https://openimageio.readthedocs.io/en/stable/imageioapi.html#sec-globalattribs)), which itself defaults to be the detected level of hardware concurrency (number of cores available).
But this is not true for make_texture. In the renderer my company uses, we do texture conversions automatically on scene load, concurrently with using multiple OpenImageIO clients via the shared TextureSystem. As such, we are beholden to whatever another client may have set nthreads to globally when calling make_texture.
How hard would it be to add an nthreads argument to make_texture, and why doesn't it already have one when the docs say it should do?
Thanks!
Is your feature request related to a problem? Please describe.
Texture conversion thread usage being separable from other client usage of OIIO.
Describe the solution you'd like
An nthreads argument for make_texture.
Describe alternatives you've considered
Running maketx from the command line with an nthreads comment in a sys shell from C++ (urgh, no thanks).
Additional context
I could make a PR, but before I do that, I'm wondering if there was a good reason this wasn't the case already, to prevent me "finding out the hard way".
The text was updated successfully, but these errors were encountered: