[Mesa-dev] [PATCH] mesa/st: unmap transfer only if not null

Brian Paul brianp at vmware.com
Mon Apr 14 09:32:13 PDT 2014


On 04/14/2014 10:17 AM, Sebastian Wick wrote:
> Fixes crash for r600g in piglit tests
> fbo-generatemipmap-3d RGB9_E5
> fbo-generatemipmap-array RGB9_E5
>
> Signed-off-by: Sebastian Wick <sebastian at sebastianwick.net>
> ---
>   src/mesa/state_tracker/st_texture.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
> index 8d559df..0e53823 100644
> --- a/src/mesa/state_tracker/st_texture.c
> +++ b/src/mesa/state_tracker/st_texture.c
> @@ -271,7 +271,8 @@ st_texture_image_unmap(struct st_context *st,
>
>      DBG("%s\n", __FUNCTION__);
>
> -   pipe_transfer_unmap(pipe, stImage->transfer);
> +   if (stImage->transfer)
> +      pipe_transfer_unmap(pipe, stImage->transfer);
>      stImage->transfer = NULL;
>   }
>
>

I think it would be interesting to know how this is happening in the 
first place.  We shouldn't be calling unmap on a texture that wasn't 
mapped or failed to map in the first place.

-Brian



More information about the mesa-dev mailing list