meta: Refactor the BlitFramebuffer color CopyTexImage fallback.
authorEric Anholt <eric@anholt.net>
Fri, 28 Feb 2014 20:36:02 +0000 (12:36 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 15 Apr 2014 21:34:06 +0000 (14:34 -0700)
commitb702233f53d6de50943fa0b81e1def8f879ab644
tree475fa46ca2918d4504e2ea7ca9b416aca446f803
parent4e43299633691f15e09e52d38b7a55444c632c3d
meta: Refactor the BlitFramebuffer color CopyTexImage fallback.

There shouldn't be anything special about copying out a subset of the src
rb to a temp before texturing from it, so just do it when we're figuring
out our src texture binding.

This drops Anuj's change to copy an extra border of 1 pixel around the src
area.  I can't see how that change could be valid, and presumably if
there's some filtering problem at edges we just need to set the right
wrap mode.

v2: Don't fall back to swrast on non-2D/RECT/2D_MS textures when we can
    still CopyTexSubImage.  Fixes a segfault regression on i965 with
    gl-3.2-layered-rendering-blit.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v1)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
Tested-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/common/meta_blit.c