diff options
author | Topi Pohjolainen <topi.pohjolainen@intel.com> | 2016-04-01 12:01:23 +0300 |
---|---|---|
committer | Topi Pohjolainen <topi.pohjolainen@intel.com> | 2016-04-21 10:20:01 +0300 |
commit | 708453952b5e27af4e29cb0351de9a465459f742 (patch) | |
tree | 3406397502f2c1791c4fdb4f121fbdda1aeed54d /src/mesa/drivers/dri/i965/intel_mipmap_tree.c | |
parent | 9e4d19372b1d7f6ab12ddab1929a53335d9cce06 (diff) | |
download | external_mesa3d-708453952b5e27af4e29cb0351de9a465459f742.zip external_mesa3d-708453952b5e27af4e29cb0351de9a465459f742.tar.gz external_mesa3d-708453952b5e27af4e29cb0351de9a465459f742.tar.bz2 |
i965/blorp: Add check for supported sample numbers
v2 (Ken): Fix the condition on using meta for stencil blits:
use_blorp -> !use_blorp
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.c | 9 |
1 files changed, 7 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 f60e1c3..e2d897a 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -2164,7 +2164,12 @@ intel_miptree_updownsample(struct brw_context *brw, struct intel_mipmap_tree *src, struct intel_mipmap_tree *dst) { - if (brw->gen < 8) { + /* There is support only for four and eight samples. */ + const bool use_blorp = brw->gen < 8 && + src->num_samples != 2 && dst->num_samples != 2 && + src->num_samples <= 8 && dst->num_samples <= 8; + + if (use_blorp) { brw_blorp_blit_miptrees(brw, src, 0 /* level */, 0 /* layer */, src->format, SWIZZLE_XYZW, @@ -2182,7 +2187,7 @@ intel_miptree_updownsample(struct brw_context *brw, } if (src->stencil_mt) { - if (brw->gen >= 8) { + if (!use_blorp) { brw_meta_stencil_updownsample(brw, src->stencil_mt, dst); return; } |