-
Notifications
You must be signed in to change notification settings - Fork 2
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
Unity with DX11 texture can't be registered in CUDA #2
Comments
The texture that has been created in Unity with DX11 API, will have the type |
I use this code to see that : ID3D11Texture2D *d3dtex = (ID3D11Texture2D *)_textureHandle;
assert(d3dtex);
D3D11_TEXTURE2D_DESC texDesc;
d3dtex->GetDesc(&texDesc);
DXGI_FORMAT format = texDesc.Format;
Log::log().debugLog(std::to_string(format)); |
This issue was already reported here : see issue tracker |
To solve this issue I have to create another texture and copy the content of the texture created in Unity into it. This will cause an overhead... |
Hello @davidAlgis, we also plan to use Unity with Cuda and got some code working. During my research I stumbled over your project which looks very promising. Because we focus on windows + directx I started to implement d3d11. As you can see I used Texture2D and Texture2DArray instead of RenderTexture to get rid of the problem with format ..._TYPLESS.
Does the "action_sample_texture_array" work with this workaround? |
For RenderAPI DX11 I add methods to create and copy texture see #2
Hi @deibich,
On OpenGL, I could registered directly the texture array into a cuda surface object, that was then written with |
One drawback of using
I think I will let the 2 options (with and without copy), just in case. |
For RenderAPI DX11 I add methods to create and copy texture see #2
For RenderAPI DX11 I add methods to create and copy texture see #2
When I try to register in CUDA a texture DX11 that has been created in Unity, I get the following error :
ErrorCuda error: 1 invalid argument
.The text was updated successfully, but these errors were encountered: