On 25 November 2013 17:01, Stefan Dösinger stefandoesinger@gmail.com wrote:
I've attached the current state of the surface patches for reference. Patches 2 and 26 are simpler without PBOs, and I'll have to duplicate patches 27-29, 33, 41 and 50 in surface.c and then delete or move the code in separate patches.
I'd appreciate it if you could take a look at the entire patchset and see if there's anything else you don't like conceptually or if there's another major reordering you want.
I reviewed about half of this, and only very roughly: - In patch 05/72 you remove DIB maps. Similar to this patch, I'd prefer fixing things in an incremental way, instead of essentially rewriting the entire thing. - In patch 14/72 you introduce wined3d_resource_invalidate_location(). It's not clear to me that this makes sense for container resources like textures in that form. The way I was going to handle that was to create a distinction between resources (textures, buffers) and subresources (surfaces, volumes, buffers). - I don't like patch 15/72 at all. I think this should pretty much just be a matter of doing "wined3d_resource_invalidate_location(subresource->container);" in the subresource. - The context restoration in patch 18-20/72 is pretty nasty. We should probably introduce a variant of context_release() that takes the wined3d context to restore as a second parameter instead.
As a general theme, I think the better approach is to first unify how things work between e.g. surfaces and volumes, and then merge them on the resource/subresource level, as opposed to first adding duplicate functionality to resources that only works for specific resource types.