davidAlgis / InteropUnityCUDA

Demonstrate interoperability between Unity Engine and CUDA
MIT License
35 stars 3 forks source link

Unable to generate mips with DX11 and Texture2D #6

Open davidAlgis opened 1 year ago

davidAlgis commented 1 year ago

I wanted to generate the mip map of a Texture2D directly from the graphics API. But with DX11 a Texture2D is created with miscflag 0, and the function to generate mip maps with DX11 needs to have the flag D3D11_RESOURCE_MISC_GENERATE_MIPS. (cf. https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-generatemips)

davidAlgis commented 1 year ago

A possibility will to be generate them directly with CUDA.