mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 20:58:04 +02:00
meta: Fix GL_RENDERBUFFER binding in decompress_texture_image().
This isn't saved/restored by _mesa_meta_begin, so we need to do it
manually (like we do for the read/draw framebuffers). Additionally,
we neglected to re-bind before the glRenderbufferStorage call.
+13 oglconforms.
NOTE: This is a candidate for stable release branches.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 7fde071f04)
This commit is contained in:
parent
a03d5e6a88
commit
5c2f9828e0
1 changed files with 4 additions and 0 deletions
|
|
@ -3256,6 +3256,7 @@ decompress_texture_image(struct gl_context *ctx,
|
|||
};
|
||||
struct vertex verts[4];
|
||||
GLuint fboDrawSave, fboReadSave;
|
||||
GLuint rbSave;
|
||||
|
||||
if (slice > 0) {
|
||||
assert(target == GL_TEXTURE_3D ||
|
||||
|
|
@ -3272,6 +3273,7 @@ decompress_texture_image(struct gl_context *ctx,
|
|||
/* save fbo bindings (not saved by _mesa_meta_begin()) */
|
||||
fboDrawSave = ctx->DrawBuffer->Name;
|
||||
fboReadSave = ctx->ReadBuffer->Name;
|
||||
rbSave = ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0;
|
||||
|
||||
_mesa_meta_begin(ctx, MESA_META_ALL & ~MESA_META_PIXEL_STORE);
|
||||
|
||||
|
|
@ -3292,6 +3294,7 @@ decompress_texture_image(struct gl_context *ctx,
|
|||
|
||||
/* alloc dest surface */
|
||||
if (width > decompress->Width || height > decompress->Height) {
|
||||
_mesa_BindRenderbufferEXT(GL_RENDERBUFFER_EXT, decompress->RBO);
|
||||
_mesa_RenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA,
|
||||
width, height);
|
||||
decompress->Width = width;
|
||||
|
|
@ -3424,6 +3427,7 @@ decompress_texture_image(struct gl_context *ctx,
|
|||
_mesa_BindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, fboDrawSave);
|
||||
_mesa_BindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, fboReadSave);
|
||||
}
|
||||
_mesa_BindRenderbufferEXT(GL_RENDERBUFFER_EXT, rbSave);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue