mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-16 01:08:05 +02:00
intel: Fix use of freed buffer if glBitmap is called after a swap.
Regions looked up from the framebuffer are invalid after
intel_prepare_render().
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30266
Tested-by: Thomas Jones <thomas.jones@utoronto.ca>
(cherry picked from commit 066bee64e1)
This commit is contained in:
parent
98af042079
commit
d3bfa9bb4a
1 changed files with 4 additions and 3 deletions
|
|
@ -175,7 +175,7 @@ do_blit_bitmap( struct gl_context *ctx,
|
|||
const GLubyte *bitmap )
|
||||
{
|
||||
struct intel_context *intel = intel_context(ctx);
|
||||
struct intel_region *dst = intel_drawbuf_region(intel);
|
||||
struct intel_region *dst;
|
||||
struct gl_framebuffer *fb = ctx->DrawBuffer;
|
||||
GLfloat tmpColor[4];
|
||||
GLubyte ubcolor[4];
|
||||
|
|
@ -198,6 +198,9 @@ do_blit_bitmap( struct gl_context *ctx,
|
|||
return GL_FALSE;
|
||||
}
|
||||
|
||||
intel_prepare_render(intel);
|
||||
dst = intel_drawbuf_region(intel);
|
||||
|
||||
if (!dst)
|
||||
return GL_FALSE;
|
||||
|
||||
|
|
@ -226,8 +229,6 @@ do_blit_bitmap( struct gl_context *ctx,
|
|||
if (!intel_check_blit_fragment_ops(ctx, tmpColor[3] == 1.0F))
|
||||
return GL_FALSE;
|
||||
|
||||
intel_prepare_render(intel);
|
||||
|
||||
/* Clip to buffer bounds and scissor. */
|
||||
if (!_mesa_clip_to_region(fb->_Xmin, fb->_Ymin,
|
||||
fb->_Xmax, fb->_Ymax,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue