On 8 December 2015 at 16:35, Neil Roberts <n...@linux.intel.com> wrote:
> 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.ch...@intel.com>
> Cc: "11.1" <mesa-sta...@lists.freedesktop.org>
Worth throwing in 11.0 as well ?

> ---
>
> I've also posted a Piglit test for this here:
>
> http://patchwork.freedesktop.org/patch/67356/
>
>  src/mesa/drivers/dri/i965/brw_context.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_context.c 
> b/src/mesa/drivers/dri/i965/brw_context.c
> index 7d7643c..5374bad 100644
> --- a/src/mesa/drivers/dri/i965/brw_context.c
> +++ b/src/mesa/drivers/dri/i965/brw_context.c
> @@ -159,8 +159,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);
 Afaict i915 could use an identical fix ?

-Emil
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to