mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
st/mesa: Validate state before doing blits.
Specifically, this ensures things like the front buffer actually exist. This
fixes piglt fbo/fbo-sys-blit and fd.o bug 35483.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
(cherry picked from commit 5d7c27f5ec)
This commit is contained in:
parent
7397c034ac
commit
6b46754bc0
1 changed files with 3 additions and 0 deletions
|
|
@ -38,6 +38,7 @@
|
|||
#include "st_texture.h"
|
||||
#include "st_cb_blit.h"
|
||||
#include "st_cb_fbo.h"
|
||||
#include "st_atom.h"
|
||||
|
||||
#include "util/u_blit.h"
|
||||
#include "util/u_inlines.h"
|
||||
|
|
@ -75,6 +76,8 @@ st_BlitFramebuffer(GLcontext *ctx,
|
|||
struct gl_framebuffer *readFB = ctx->ReadBuffer;
|
||||
struct gl_framebuffer *drawFB = ctx->DrawBuffer;
|
||||
|
||||
st_validate_state(st);
|
||||
|
||||
if (!_mesa_clip_blit(ctx, &srcX0, &srcY0, &srcX1, &srcY1,
|
||||
&dstX0, &dstY0, &dstX1, &dstY1)) {
|
||||
return; /* nothing to draw/blit */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue