diff options
author | Jason Ekstrand <[email protected]> | 2015-02-27 12:29:03 -0800 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-03-07 17:21:24 +0000 |
commit | 53d66c0c7c39fbe2a587a849e0714d6f9a01f476 (patch) | |
tree | 39176edac58b05ce378ea88041e19eceec94f85c /src | |
parent | 560fb4ee450659ed603338301f8d0af827d56f16 (diff) |
meta/TexSubImage: Stash everything other than PIXEL_TRANSFER/store in meta_begin
Previously, there were bugs where if the app set a scissor it could affect
the area of the texture that was downloaded. There was also potential that
the framebuffer SRGB state could affect downloads. This ensures that those
will get saved/restored and can't affect the texture download.
Cc: 10.5 <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89292
Reviewed-by: Neil Roberts <[email protected]>
(cherry picked from commit b1ab02d9c0cc11ba8ef4efaba9452d644b6a0811)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/common/meta_tex_subimage.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/common/meta_tex_subimage.c b/src/mesa/drivers/common/meta_tex_subimage.c index ffbbacd8fd8..9f0c1159c82 100644 --- a/src/mesa/drivers/common/meta_tex_subimage.c +++ b/src/mesa/drivers/common/meta_tex_subimage.c @@ -183,8 +183,8 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims, if (allocate_storage) ctx->Driver.AllocTextureImageBuffer(ctx, tex_image); - /* Only stash the current FBO */ - _mesa_meta_begin(ctx, 0); + _mesa_meta_begin(ctx, ~(MESA_META_PIXEL_TRANSFER | + MESA_META_PIXEL_STORE)); _mesa_GenFramebuffers(2, fbos); _mesa_BindFramebuffer(GL_READ_FRAMEBUFFER, fbos[0]); @@ -304,8 +304,8 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims, if (!pbo_tex_image) return false; - /* Only stash the current FBO */ - _mesa_meta_begin(ctx, 0); + _mesa_meta_begin(ctx, ~(MESA_META_PIXEL_TRANSFER | + MESA_META_PIXEL_STORE)); _mesa_GenFramebuffers(2, fbos); |