i965/blorp: Add support for source swizzle
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Sat, 9 Apr 2016 16:48:14 +0000 (19:48 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Thu, 21 Apr 2016 07:20:01 +0000 (10:20 +0300)
commit6b33d63d77ab7835b5883140e54316e86e73888d
treeef4fa44baaa91f9fd764cca4599eac015dcbc626
parent52e7008a5a3655c9bd0abf8bfeb5110a98723e57
i965/blorp: Add support for source swizzle

In order to support cases where gen9 uses RGBA format to back client
requested RGB, one needs to have means to force alpha channel to one
when user requested RGB surface is used as blit source.

v2 (Ken): Use helper for constructing the swizzle (this should be
          changed to use brw_get_texture_swizzle() as a follow-up).
          Also calculate the swizzle for CopyTexSubImage.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_blorp.cpp
src/mesa/drivers/dri/i965/brw_blorp.h
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
src/mesa/drivers/dri/i965/gen8_blorp.cpp
src/mesa/drivers/dri/i965/intel_mipmap_tree.c