-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RendererServices::good() no longer used when generating textures #1122
Comments
You are right. I am not sure what the original intent of the call was, but I don't think this API is really needed. I can't think of a case where we need to validate the texture handle on the OSL side before trying to use it. The lookups themselves are supposed to signal the error when attempting to use a broken handle. Calling I think we should just deprecate/remove it. |
FWIW, demand-loaded GPU textures might want something like that. For when the texture file hasn't been opened, so size etc are unknown. An Optix 7 demand-loading library is coming soon. |
In this case, I would still expect I don't see a need for OSL itself to need to know if the handle is "good" or not. Only the renderer (which implements these methods) should care, so the extra virtual entry point seems redundant. |
It was there for a reason. I need to look at the older code to remember why. Was it needed during optimization? |
The spots where it was called before didn't really make much sense. It was only resetting the handle to null when it was not If |
Problem
While doing some texture work I noticed that the RendererServices::good() function is no longer being called when generating textures. The function serves as an interface to validate texture handles retrieved from RendererServices::get_texture_handle(). This was removed as of a5d8381 and the texture handle is now just checked if it is non NULL. What are the plans for this API moving forward? If it is no longer going to be used there should probably be some indication that it is deprecated.
Versions
The text was updated successfully, but these errors were encountered: