-
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
confusing phrasing for num_mip_levels #1241
Comments
I've reopened this issue to determine exactly what |
I made a quick tester over the weekend to see how this behaves on our implementation and in short it behaves consistent with the updates in #1255 (this is also the behavior I'd expect, intuitively). I tested and found:
So, I don't see any reason to change or revert #1255. @karolherbst can you give this a try on your implementation? Here is the output on my system for the three scenarios above ( bashbaug@bashbaug-newpc:~/git/SimpleOpenCLSamples/install/RelWithDebInfo$ ./mipmapimage -p2 -m0
Running on platform: Intel(R) OpenCL Graphics
Running on device: Intel(R) Arc(TM) A750 Graphics
Device supports cl_khr_mipmap_image.
Creating a 32 x 32 image with 0 mip levels...
Initializing mipmap image...
Found 0 mip levels.
At base level: found 1.000000, wanted 1.000000
At mip level 0: found 1.000000, wanted 1.000000
At out-of-range mip level 1: found 1.000000
At out-of-range mip level 2: found 1.000000
At out-of-range mip level 3: found 1.000000
bashbaug@bashbaug-newpc:~/git/SimpleOpenCLSamples/install/RelWithDebInfo$ ./mipmapimage -p2 -m1
Running on platform: Intel(R) OpenCL Graphics
Running on device: Intel(R) Arc(TM) A750 Graphics
Device supports cl_khr_mipmap_image.
Creating a 32 x 32 image with 1 mip levels...
Initializing mipmap image...
Found 1 mip levels.
At base level: found 1.000000, wanted 1.000000
At mip level 0: found 1.000000, wanted 1.000000
At out-of-range mip level 1: found 1.000000
At out-of-range mip level 2: found 1.000000
At out-of-range mip level 3: found 1.000000
bashbaug@bashbaug-newpc:~/git/SimpleOpenCLSamples/install/RelWithDebInfo$ ./mipmapimage -p2 -m3
Running on platform: Intel(R) OpenCL Graphics
Running on device: Intel(R) Arc(TM) A750 Graphics
Device supports cl_khr_mipmap_image.
Creating a 32 x 32 image with 3 mip levels...
Initializing mipmap image...
Found 3 mip levels.
At base level: found 0.333333, wanted 0.333333
At mip level 0: found 0.333333, wanted 0.333333
At mip level 1: found 0.666667, wanted 0.666667
At mip level 2: found 1.000000, wanted 1.000000
At out-of-range mip level 3: found 1.000000
At out-of-range mip level 4: found 1.000000
At out-of-range mip level 5: found 1.000000 |
yeah, that matches my interpretation as well. I think what mostly confused me is that the wording can be confusing depending on how you understand those terms. If "number of mipmaps" means levels additional to the base level or levels in total. It's the latter and you seem to agree here. If that was your understanding all along then yes, nothing needs to be fixed. However I think it makes sense to clarify this in the spec and specifically state that 0 and 1 are identical. |
Please review #1272, which adds additional clarification for "num_mip_levels". |
Closing after merging #1272. |
The spec currently says:
I think this must should be a may instead, and it should probably should say "greater than or equal to 1" instead of "greater than 1"?
The text was updated successfully, but these errors were encountered: