mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-21 04:20:24 +01:00
i965: Fix crash when calling glViewport with no surface bound
If EGL_KHR_surfaceless_context is used then glViewport can be called
with NULL for the draw and read surfaces. This was previously causing
a crash because the i965 driver tries to use this point to invalidate
the surfaces and it was derferencing the NULL pointer.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93257
Cc: Nanley Chery <nanley.g.chery@intel.com>
Cc: "11.1" <mesa-stable@lists.freedesktop.org>
Tested-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
(cherry picked from commit 8c5310da9d)
This commit is contained in:
parent
ab0b96a939
commit
bdf289e7fb
1 changed files with 4 additions and 2 deletions
|
|
@ -158,8 +158,10 @@ intel_viewport(struct gl_context *ctx)
|
|||
__DRIcontext *driContext = brw->driContext;
|
||||
|
||||
if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) {
|
||||
dri2InvalidateDrawable(driContext->driDrawablePriv);
|
||||
dri2InvalidateDrawable(driContext->driReadablePriv);
|
||||
if (driContext->driDrawablePriv)
|
||||
dri2InvalidateDrawable(driContext->driDrawablePriv);
|
||||
if (driContext->driReadablePriv)
|
||||
dri2InvalidateDrawable(driContext->driReadablePriv);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue