diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index abb3d49c0d0..165a04319a4 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -355,6 +355,12 @@ driver_RenderTexture_is_safe(const struct gl_renderbuffer_attachment *att) if (texImage->Width == 0 || texImage->Height == 0 || texImage->Depth == 0) return false; + if ((texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY + && att->Zoffset >= texImage->Height) + || (texImage->TexObject->Target != GL_TEXTURE_1D_ARRAY + && att->Zoffset >= texImage->Depth)) + return false; + return true; }