Access ID3D11Texture2D with 8 samples in CUDA? Is there a way to access an ID3D11Texture2D with 8 sa

I have an [font=“Courier New”]ID3D11Texture2D[/font] with the following descriptor:


ZeroMemory(&td, sizeof(td));

td.Width = m_uiWidth;

td.Height = m_uiHeight;

td.MipLevels = 1;

td.ArraySize = 1;

td.Format = DXGI_FORMAT_R32_FLOAT;

td.SampleDesc.Count = 8;

td.SampleDesc.Quality = 0;

td.BindFlags = D3D11_BIND_RENDER_TARGET;

I want to read and write to this texture (all 8 samples) using CUDA. Is this possible somehow?

I have tried the following:

[font=“Courier New”]cudaGraphicsD3D11RegisterResource >> cudaGraphicsMapResources >> cudaGraphicsSubResourceGetMappedArray[/font]

to READ: [font=“Courier New”]cudaBindTextureToArray >> tex2DLayered[/font]

to WRITE: [font=“Courier New”]cudaMemcpy3D[/font] (from linear memory allocated with [font=“Courier New”]cudaMalloc3D[/font])

but it looks like I cannot access all 8 samples this way.

I also tried to have direct read/write access using a surface reference:

[font=“Courier New”]cudaGraphicsD3D11RegisterResource >> cudaGraphicsMapResources >> cudaGraphicsSubResourceGetMappedArray >> cudaBindSurfaceToArray[/font]

to READ: [font=“Courier New”]surf2Dread[/font]

to WRITE: [font=“Courier New”]surf2Dwrite[/font]

Any ideas? … or does it even work?