[Mesa-dev] [PATCH] radeonsi: initialise imported surface to 0.

Marek Olšák maraeo at gmail.com
Mon Aug 14 10:30:39 UTC 2017


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Mon, Aug 14, 2017 at 8:03 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> For memobj imports we weren't setting the surface to 0, which
> meant sometimes we'd end up with tile_swizzle garbage, which
> would corrupt rendering.
>
> This seems to fix the image corruption on the imported memory
> objects in vrdashboard for me.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/gallium/drivers/radeon/r600_texture.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
> index 176896f..deedfaf 100644
> --- a/src/gallium/drivers/radeon/r600_texture.c
> +++ b/src/gallium/drivers/radeon/r600_texture.c
> @@ -2913,7 +2913,7 @@ r600_texture_from_memobj(struct pipe_screen *screen,
>         struct r600_common_screen *rscreen = (struct r600_common_screen*)screen;
>         struct r600_memory_object *memobj = (struct r600_memory_object *)_memobj;
>         struct r600_texture *rtex;
> -       struct radeon_surf surface;
> +       struct radeon_surf surface = {};
>         struct radeon_bo_metadata metadata = {};
>         enum radeon_surf_mode array_mode;
>         bool is_scanout;
> --
> 2.9.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list