I'm writing an app in XNA/C# where I need to process Data with the GPU.
I put my data into a R32F texture since the data is a float[].
I then create a Surface with a Usage.RenderTarget, and a RenderToSurface.
I render a Sprite of the Texture, and I have a shader that processes each pixel.
All work well so far...
I then need to read the data back to CPU:
I cannot use LockRectangle on the RenderSurface, because it has to be in Pool.Default and this is not allowed, so the only way I found was to use CreateOffscreenPlainSurface to create a new Surface that is in SystemMemory, copy the RenderSurface into that Surface using GetRenderTargetData, and LockRectangle on the PlainSurface then read the stream from LockRectangle.
All goes well on my nVidia 8600GT, but when I run it on my Laptop (Intel GMA x3100), there is no R32F format for OffscreenPlainSurface.
So, I'm wondering if there is another way to read the data back from a RenderToSurface directly, without the extra copy.
The only other way I see right now is to convert the data to A8R8G8B8, rebuild it in the shader, then render in A8R8G8B8 and read that out...
but that seems like a very unefficient way to work with floats!
Any other suggestion would be very welcome!
Regards