mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 19:58:09 +02:00
i965: Remember to call intel_prepare_render() before blitting.
Otherwise, blits to the window system buffer may cause crashes,
since dst_irb->mt may be NULL.
This code is lifted straight out of brw_blorp_framebuffer()'s
try_blorp_blit() helper.
Fixes crashes in Piglit's fbo-sys-blit on systems without BLORP.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65919
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Cc: "9.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit fb3d62fe3d)
This commit is contained in:
parent
10ff10c89e
commit
3da0c76ec0
1 changed files with 5 additions and 0 deletions
|
|
@ -665,6 +665,11 @@ intel_blit_framebuffer_with_blitter(struct gl_context *ctx,
|
||||||
{
|
{
|
||||||
struct brw_context *brw = brw_context(ctx);
|
struct brw_context *brw = brw_context(ctx);
|
||||||
|
|
||||||
|
/* Sync up the state of window system buffers. We need to do this before
|
||||||
|
* we go looking for the buffers.
|
||||||
|
*/
|
||||||
|
intel_prepare_render(brw);
|
||||||
|
|
||||||
if (mask & GL_COLOR_BUFFER_BIT) {
|
if (mask & GL_COLOR_BUFFER_BIT) {
|
||||||
GLint i;
|
GLint i;
|
||||||
const struct gl_framebuffer *drawFb = ctx->DrawBuffer;
|
const struct gl_framebuffer *drawFb = ctx->DrawBuffer;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue