-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Henri,
I'm sending my current swapchain flipping patches for you to look at in case you have any comments.
A few notes:
*) It doesn't involve the front buffer yet, it only cycles through the back buffers. Patch 8 has a few comments about that.
*) The first interesting patch is patch 4. I am updating the wined3d_surface pointers in each d3d9_surface in the swapchain and adjust the d3d9 surface's parents.
*) The other interesting parts are patch 7 and 8. If a view is created for a swapchain texture I'm storing the swapchain + buffer index in the view. When the view is used the texture is fetched from the swapchain. Alternatively I could maintain a list of views that are created for each texture and modify the views in present. With the current way we don't have to worry about how many views there are, but it makes looking up the actual texture slightly more expensive.
So far this is only implemented for render target views, but the same approach should work for shader resource views.
Before sending this I'm going to remove the back buffer type from the wined3d interface. It's not used anywhere according to MSDN, and none of the stereo hacks out there (occulus rift, ati quad buffer, nvidia 3d vision) use it.
Stefan