Skip to content

Conversation

@lgritz
Copy link
Collaborator

@lgritz lgritz commented Jan 26, 2026

Nearly all IBA functions take an optional parameter controlling the threading. But make_texture() did not, so there was no way to control its thread usage (it would always use the default number of threads).

Without changing the call signature or ABI, this patch merely makes make_texture honor any "maketx:threads" hint passed in the config ImageSpec that it already takes to convey all sorts of controls over the texture creation process. Then this value is passed to any IBA functions, use of parallel_image, and anything else in the implementation of make_texture that would end up using the thread pool.

Fixes #4254

Nearly all IBA functions take an optional nthreads parameter. But
make_texture() did not, so there was no way to control its thread
usage (it would always use the default number of threads).

Without changing the call signature or ABI, this patch merely makes
make_texture honor any "maketx:threads" hint passed in the config
ImageSpec. Then this value is passed to the IBA functions, use of
parallel_image, and anything else in the implementation of
make_texture that would end up using the thread pool.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Signed-off-by: Larry Gritz <lg@larrygritz.com>
Copy link
Contributor

@jessey-git jessey-git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks alright to me now. Watch out for the clang-format error though.

@lgritz lgritz merged commit bdb4208 into AcademySoftwareFoundation:main Jan 28, 2026
29 of 30 checks passed
@lgritz lgritz deleted the lg-mktexthread branch January 28, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] OIIO::ImageBufAlgo::make_texture doesn't take an nthreads argument

2 participants