wined3d: Avoid some needless depth buffer copies.
authorHenri Verbeet <hverbeet@codeweavers.com>
Wed, 28 Apr 2010 22:08:59 +0000 (00:08 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 29 Apr 2010 15:19:39 +0000 (10:19 -0500)
commitf09b8e454d932f3768c8ad5f6f4658ee587f291e
tree40e62c7487462edd53681c9bc813c78d746e5928
parent34ffff074f12d178308e8f7bbe31377f40dff6cd
wined3d: Avoid some needless depth buffer copies.

If an application switches between render targets of a different size, but
with the same depth/stencil surface it'll typically clear the depth/stencil
surface before drawing. However, in case of the smaller render target that
wouldn't be a full clear, so we'd have to do a depth copy if we also switched
between onscreen and offscreen rendering. Keeping track of which part of the
depth/stencil surface is current for onscreen/offscreen allows us to avoid
most of these kinds of copies. The current scheme requires the current/dirty
rectangle to have an origin at (0,0). This could be extended to an arbitrary
rectangle, but the bookkeeping becomes somewhat more complex in that case, and
it's not clear that there would be much of a benefit at this point.
dlls/wined3d/arb_program_shader.c
dlls/wined3d/device.c
dlls/wined3d/drawprim.c
dlls/wined3d/glsl_shader.c
dlls/wined3d/shader.c
dlls/wined3d/surface.c
dlls/wined3d/swapchain.c
dlls/wined3d/wined3d_private.h