[Mesa-dev] [PATCH] st/dri: Fix crash in st/dri from dri format commit

Jesse Barnes jbarnes at virtuousgeek.org
Thu Feb 23 10:11:05 PST 2012


On Thu, 23 Feb 2012 18:50:17 +0100
Jakob Bornecrantz <jakob at vmware.com> wrote:

> Introduced with 8de5c355fa2bf0f30df2c7cf39aee01e793284bf, it would probably just crash.
> 
> Cheers, Jakob.
> 
> Signed-off-by: Jakob Bornecrantz <jakob at vmware.com>
> ---
>  src/gallium/state_trackers/dri/drm/dri2.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
> index cc8023d..d0be710 100644
> --- a/src/gallium/state_trackers/dri/drm/dri2.c
> +++ b/src/gallium/state_trackers/dri/drm/dri2.c
> @@ -440,8 +440,6 @@ dri2_create_image_from_name(__DRIscreen *_screen,
>  
>     tex_usage = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW;
>  
> -   img->dri_format = format;
> -
>     switch (format) {
>     case __DRI_IMAGE_FORMAT_RGB565:
>        pf = PIPE_FORMAT_B5G6R5_UNORM;
> @@ -489,6 +487,7 @@ dri2_create_image_from_name(__DRIscreen *_screen,
>  
>     img->level = 0;
>     img->layer = 0;
> +   img->dri_format = format;
>     img->loader_private = loaderPrivate;
>  
>     return img;

Yep, thanks Jakob.

Reviewed-by: Jesse Barnes <jbarnes at virtuousgeek.org>

-- 
Jesse Barnes, Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120223/b701862b/attachment-0001.pgp>


More information about the mesa-dev mailing list