[Mesa-dev] [PATCH] dri_util: fail driCreateNewScreen if InitScreen is NULL

Paulo Zanoni przanoni at gmail.com
Thu Jan 13 05:12:58 PST 2011


I forgot to mention: this will give us a working X server with
_software_ rendering, instead of a segfaulting X.

2011/1/13 Paulo Zanoni <pzanoni at mandriva.com>:
> Without this, X doesn't start with UMS on r300g.
>
> Signed-off-by: Paulo Zanoni <pzanoni at mandriva.com>
> ---
>
> Sending patch as discussed in #radeon
> Tested with mesa 7.10. If the patch is accepted, please backport to 7.10.
>
>  src/mesa/drivers/dri/common/dri_util.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
> index a5b71bd..bf8cf6e 100644
> --- a/src/mesa/drivers/dri/common/dri_util.c
> +++ b/src/mesa/drivers/dri/common/dri_util.c
> @@ -790,6 +790,9 @@ driCreateNewScreen(int scrn,
>     static const __DRIextension *emptyExtensionList[] = { NULL };
>     __DRIscreen *psp;
>
> +    if (driDriverAPI.InitScreen == NULL)
> +       return NULL;
> +
>     psp = calloc(1, sizeof *psp);
>     if (!psp)
>        return NULL;
> --
> 1.7.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>



-- 
Paulo Zanoni


More information about the mesa-dev mailing list