mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
mesa: Generate a renderbuffer wrapper even if the texture has no image
This prevents a segfault in check_begin_texture_render when an FBO is
rebound while in this state. This fixes the piglit test
fbo-incomplete-invalid-texture.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "9.1 9.2" mesa-stable@lists.freedesktop.org
(cherry picked from commit 2f9fe2d80a)
This commit is contained in:
parent
70c9e07bd4
commit
6f9b090719
1 changed files with 3 additions and 2 deletions
|
|
@ -385,8 +385,6 @@ _mesa_update_texture_renderbuffer(struct gl_context *ctx,
|
|||
struct gl_renderbuffer *rb;
|
||||
|
||||
texImage = att->Texture->Image[att->CubeMapFace][att->TextureLevel];
|
||||
if (!texImage)
|
||||
return;
|
||||
|
||||
rb = att->Renderbuffer;
|
||||
if (!rb) {
|
||||
|
|
@ -405,6 +403,9 @@ _mesa_update_texture_renderbuffer(struct gl_context *ctx,
|
|||
rb->NeedsFinishRenderTexture = ctx->Driver.FinishRenderTexture != NULL;
|
||||
}
|
||||
|
||||
if (!texImage)
|
||||
return;
|
||||
|
||||
rb->_BaseFormat = texImage->_BaseFormat;
|
||||
rb->Format = texImage->TexFormat;
|
||||
rb->InternalFormat = texImage->InternalFormat;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue