mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
meta: Don't call _mesa_Ortho with width or height of 0
Fixes failures in oglconform fbo mipmap.manual.color, mipmap.manual.colorAndDepth, mipmap.automatic, and mipmap.manualIterateTexTargets subtests. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Cc: "9.2" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
17bb96b03d
commit
341fb93c16
1 changed files with 8 additions and 3 deletions
|
|
@ -704,9 +704,14 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
|
|||
_mesa_LoadIdentity();
|
||||
_mesa_MatrixMode(GL_PROJECTION);
|
||||
_mesa_LoadIdentity();
|
||||
_mesa_Ortho(0.0, ctx->DrawBuffer->Width,
|
||||
0.0, ctx->DrawBuffer->Height,
|
||||
-1.0, 1.0);
|
||||
|
||||
/* glOrtho with width = 0 or height = 0 generates GL_INVALID_VALUE.
|
||||
* This can occur when there is no draw buffer.
|
||||
*/
|
||||
if (ctx->DrawBuffer->Width != 0 && ctx->DrawBuffer->Height != 0)
|
||||
_mesa_Ortho(0.0, ctx->DrawBuffer->Width,
|
||||
0.0, ctx->DrawBuffer->Height,
|
||||
-1.0, 1.0);
|
||||
}
|
||||
|
||||
if (state & MESA_META_CLIP) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue