mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 11:20:20 +01:00
i965: Prevent invalid framebuffer usage
When a surfaceless context is in use, driDrawablePriv might be NULL, so needs to be checked before calling dri2InvalidateDrawable. Same for read calls. Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eleni Maria Stea <estea@igalia.com> See https://gitlab.freedesktop.org/mesa/mesa/-/issues/778 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11459>
This commit is contained in:
parent
6a0c0d0da9
commit
7b89e4d104
1 changed files with 4 additions and 2 deletions
|
|
@ -42,7 +42,8 @@ brw_drawbuffer(struct gl_context *ctx)
|
|||
* time, invalidate our DRI drawable so we'll ask for new buffers
|
||||
* (including the fake front) before we start rendering again.
|
||||
*/
|
||||
dri2InvalidateDrawable(brw->driContext->driDrawablePriv);
|
||||
if (brw->driContext->driDrawablePriv)
|
||||
dri2InvalidateDrawable(brw->driContext->driDrawablePriv);
|
||||
brw_prepare_render(brw);
|
||||
}
|
||||
}
|
||||
|
|
@ -58,7 +59,8 @@ brw_readbuffer(struct gl_context * ctx, GLenum mode)
|
|||
* time, invalidate our DRI drawable so we'll ask for new buffers
|
||||
* (including the fake front) before we start reading again.
|
||||
*/
|
||||
dri2InvalidateDrawable(brw->driContext->driReadablePriv);
|
||||
if (brw->driContext->driDrawablePriv)
|
||||
dri2InvalidateDrawable(brw->driContext->driReadablePriv);
|
||||
brw_prepare_render(brw);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue