Ok creating a usable IDirect3D9Texture with MSAA is indeed harder than I thought, it seems your method of copying from a multi sampled surface is the best solution.
I'm not convinced about copying from the back buffer though, I'll try to find a cleaner solution, here's what I have in mind:
- If the render target has multisampling support, create a multi sampled IDirect3D9Surface (Locking will be disabled in this case also.) AND a IDirect3D9Texture with RTT usage.
- When the render target is set, use the multi sampled surface.
- When another render target is set after that, perform a StretchRect copy straight to the texture surface.
This should work fine in most cases, with the slight memory overhead of having 2 copies, but it certainly beats rendering to texture twice the size of the original, this one only uses twice as much memory compared to quadruple.
Ok who am I kidding I think I'll just use your solution and call it a day.
I'll provide a patch for D3D and OGL implementations soon.