summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
diff options
context:
space:
mode:
authorTopi Pohjolainen <topi.pohjolainen@intel.com>2016-04-09 19:48:14 +0300
committerTopi Pohjolainen <topi.pohjolainen@intel.com>2016-04-21 10:20:01 +0300
commit6b33d63d77ab7835b5883140e54316e86e73888d (patch)
treeef4fa44baaa91f9fd764cca4599eac015dcbc626 /src/mesa/drivers/dri/i965/intel_mipmap_tree.c
parent52e7008a5a3655c9bd0abf8bfeb5110a98723e57 (diff)
downloadexternal_mesa3d-6b33d63d77ab7835b5883140e54316e86e73888d.zip
external_mesa3d-6b33d63d77ab7835b5883140e54316e86e73888d.tar.gz
external_mesa3d-6b33d63d77ab7835b5883140e54316e86e73888d.tar.bz2
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>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_mipmap_tree.c')
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index d263ff8..f60e1c3 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -2166,7 +2166,8 @@ intel_miptree_updownsample(struct brw_context *brw,
{
if (brw->gen < 8) {
brw_blorp_blit_miptrees(brw,
- src, 0 /* level */, 0 /* layer */, src->format,
+ src, 0 /* level */, 0 /* layer */,
+ src->format, SWIZZLE_XYZW,
dst, 0 /* level */, 0 /* layer */, dst->format,
0, 0,
src->logical_width0, src->logical_height0,
@@ -2188,7 +2189,7 @@ intel_miptree_updownsample(struct brw_context *brw,
brw_blorp_blit_miptrees(brw,
src->stencil_mt, 0 /* level */, 0 /* layer */,
- src->stencil_mt->format,
+ src->stencil_mt->format, SWIZZLE_XYZW,
dst->stencil_mt, 0 /* level */, 0 /* layer */,
dst->stencil_mt->format,
0, 0,