-
Notifications
You must be signed in to change notification settings - Fork 113
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
clarify num_mip_levels #1255
clarify num_mip_levels #1255
Conversation
Sorry for not seeing this earlier. I was actually implementing the extension a few weeks ago and I was confused by this part as well. I think the original phrasing was actually more correct than the new one, but it should still be clarified. So prior the extension, 0 was the only allowed value indicating there is one "level". However, the CTS expects that 0 and 1 behave the same, meaning both result in an image with exactly one level. 2 means "there is the base level + one additional one". Maybe I misunderstood how this all works, but this understanding was the only one making the CTS pass and not going out of bounds. I think we might need to check out what other implementations are doing and if the CTS just has a different understanding here, but so far the only reasonable explanation I had for the behavior I was seeing was that 0 and 1 are identical in its meaning and I wouldn't be surprised that's where the "more than 1" wording comes from. |
E.g. here the CTS substracts 1 from However, if Therefore I think the original wording was correct, just super confusing and not clear what's meant here. |
OK, now I'm confused. :-) This matches my current understanding:
Which is also consistent with the spec text:
IMHO this means that the CTS tests are incorrect, or at least aren't testing the full set of mip levels. I also think the "must" to "may" change in this PR is correct, regardless, though we ought to clarify what |
Yeah.. I'm not entirely sure what should be correct wording, but it also depends on how it's used. Intel's stack seems to agree with the original wording and my understanding:
inline bool isMipMapped(const cl_image_desc &imgDesc) {
return (imgDesc.num_mip_levels > 1);
} And there is also So in my opinion, yes, it would have been better if And the CTS seems to be consistent with this. So I don't think we should risk breaking applications by changing the meaning here if applications rely on it. I just don't know what application even uses mipmaps, because my original reason to implement is to just get all the GL image extensions implemented up to |
In either case, I think it makes sense to clarify what this value means in the spec, because at the moment it's vague and confusing |
Fixes #1241.
Clarifies that the number of mip levels may be nonzero when the cl_khr_mipmap_image extension is supported, rather than that the number of mip levels must be greater than one.