<p dir="ltr">On Tue, Dec 08, 2015 at 04:35:57PM +0000, Neil Roberts wrote:<br>
> If EGL_KHR_surfaceless_context is used then glViewport can be called<br>
> with NULL for the draw and read surfaces. This was previously causing<br>
> a crash because the i965 driver tries to use this point to invalidate<br>
> the surfaces and it was derferencing the NULL pointer.<br>
> <br>
> Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=93257">https://bugs.freedesktop.org/show_bug.cgi?id=93257</a><br>
> Cc: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
> Cc: "11.1" <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.org</a>><br>
> ---</p>
<p dir="ltr">Thanks for the fix! I'll be able to give this a better look next week, so feel free to push if you receive an Rb before then.</p>
<p dir="ltr">Tested-by: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>></p>
<p dir="ltr">> <br>
> I've also posted a Piglit test for this here:<br>
> <br>
> <a href="http://patchwork.freedesktop.org/patch/67356/">http://patchwork.freedesktop.org/patch/67356/</a><br>
> <br>
> src/mesa/drivers/dri/i965/brw_context.c | 6 ++++--<br>
> 1 file changed, 4 insertions(+), 2 deletions(-)<br>
> <br>
> diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c<br>
> index 7d7643c..5374bad 100644<br>
> --- a/src/mesa/drivers/dri/i965/brw_context.c<br>
> +++ b/src/mesa/drivers/dri/i965/brw_context.c<br>
> @@ -159,8 +159,10 @@ intel_viewport(struct gl_context *ctx)<br>
> __DRIcontext *driContext = brw->driContext;<br>
> <br>
> if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) {<br>
> - dri2InvalidateDrawable(driContext->driDrawablePriv);<br>
> - dri2InvalidateDrawable(driContext->driReadablePriv);<br>
> + if (driContext->driDrawablePriv)<br>
> + dri2InvalidateDrawable(driContext->driDrawablePriv);<br>
> + if (driContext->driReadablePriv)<br>
> + dri2InvalidateDrawable(driContext->driReadablePriv);<br>
> }<br>
> }<br>
> <br>
> -- <br>
> 1.9.3<br>
> <br>
> _______________________________________________<br>
> mesa-stable mailing list<br>
> <a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-stable">http://lists.freedesktop.org/mailman/listinfo/mesa-stable</a></p>