diff options
author | Chris Forbes <[email protected]> | 2014-04-16 14:15:27 +1200 |
---|---|---|
committer | Chris Forbes <[email protected]> | 2014-04-17 18:11:24 +1200 |
commit | d1b6f6711095cd94e80372e7488aa0189e328d88 (patch) | |
tree | d46e23a77a25e371138b14a62a292a8898ce09f4 /src/mesa/drivers/common/meta.c | |
parent | 9927180714662456ff7b895221f67112f2567a53 (diff) |
meta: Clip src/dest rects in BlitFramebuffer, using the scissor
Fixes piglit's fbo-blit-stretch test on drivers which use the meta path.
(i965: should fix Broadwell, but also fixes Sandybridge/Ivybridge/Haswell
since this test falls off the blorp path now due to format conversion)
V2: Use scissor instead of just mangling the rects, to avoid texcoord
rounding problems. (Thanks Marek)
V3: Rebase on Eric's CTSI meta changes; re-add _mesa_update_state in the
CTSI path so that _mesa_clip_blit sees the correct bounds.
Signed-off-by: Chris Forbes <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77414
Reviewed-by: Anuj Phogat <[email protected]>
Tested-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common/meta.c')
-rw-r--r-- | src/mesa/drivers/common/meta.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index ddd0b1ad19a..ac27abba6af 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -2783,6 +2783,13 @@ copytexsubimage_using_blit_framebuffer(struct gl_context *ctx, GLuint dims, goto out; ctx->Meta->Blit.no_ctsi_fallback = true; + + /* Since we've bound a new draw framebuffer, we need to update + * its derived state -- _Xmin, etc -- for BlitFramebuffer's clipping to + * be correct. + */ + _mesa_update_state(ctx); + /* We skip the core BlitFramebuffer checks for format consistency, which * are too strict for CopyTexImage. We know meta will be fine with format * changes. |