The texture API is rather complex, and I don’t have a dedicated test case yet for the runtime version of the texture API. I’ll try to have a look at this as soon as possible, but unfortunately, I won’t be able to do this before monday evening (sorry about that), and in fact, I can not really test it, because I don’t have a CC 3.0 device. But maybe I see what may be wrong from looking over the code and creating a test case (regardless of whether I can run it or not).
Sorry for the inconveniences.
OK, this helps to narrow down the search space a bit. I’ve also been looking over the JNI part right now, but did not yet find anything “obvious” (yet). But the structures there are comparatively complex, so I may have overlooked something. I’ll have to examine the getCudaResourceDesc/getCudaTextureDesc part more closely. From a first glance, I think that possible bugs could only hide there (althogh, in the worst case, I’ll have to check whether any initialization from the preceding calls went wrong, even when there was no explicit error…). Just for the record: I assume that you are on Win64, right?
I’ve found the problems and after fixing them everything is working!
Java_jcuda_runtime_JCuda_cudaCreateTextureObjectNative
Raw pointer must be replaced by reference
cudaTextureObject_t nativePTexObject;
int result = cudaCreateTextureObject(&nativePTexObject...
*getCudaTextureDesc(JNIEnv env, jobject texDesc)
This function is not working properly because field cudaTextureDesc_mipmapFilterMode is not initialized
Please add this line
if (!init(env, cls, cudaTextureDesc_mipmapFilterMode, "mipmapFilterMode", "I")) return JNI_ERR;
So this bug has been fixed, and will be available with the next release. (BTW: ```
if (!init(env, cls, cudaTextureDesc_maxAnisotropy, “maxAnisotropy”, “I”)) return JNI_ERR;
The reasons of why I'll probably not create a new "hotfix" release for this bug include
- It seems like you already fixed it locally for you as well
- There are probably not sooo many users who already actively use the CC3.0 features
- The native libs for Linux and Mac have been published only a few days ago - let's wait whether Linux/Mac-Users also encounter errors ;)
And finally, I'd anyhow like to create an updated version where some of the pending tasks have been integrated (Stream Callbacks, maybe? Or the new Xt-libraries?), so maybe I can create an updated version that contains more than a single bugfix. But if more users stumble over this bug (and are not able to fix it on their own), I'll create an "emergency update", of course :)