[Mesa-stable] [Mesa-dev] [PATCH 07/11] st/nine: remove unused pipe_viewport_state::translate[3] and scale[3]

Ilia Mirkin imirkin at alum.mit.edu
Sun Nov 23 21:38:40 PST 2014


On Sun, Nov 23, 2014 at 5:40 PM, David Heidelberg <david at ixit.cz> wrote:
> 2efabd9f5a711a7f6cd1846630244b7814bf25b3 removed them as unused.
>
> This caused random memory overwrites (reported by Coverity).
>
> Cc: "10.4" <mesa-stable at lists.freedesktop.org>
> Reviewed-by: Marek Olšák <marek.olsak at amd.com>
> Reviewed-by: Axel Davy <axel.davy at ens.fr>
> Signed-off-by: David Heidelberg <david at ixit.cz>

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

> ---
>  src/gallium/state_trackers/nine/nine_state.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c
> index 6924449..37de6a3 100644
> --- a/src/gallium/state_trackers/nine/nine_state.c
> +++ b/src/gallium/state_trackers/nine/nine_state.c
> @@ -141,11 +141,9 @@ update_viewport(struct NineDevice9 *device)
>      pvport.scale[0] = (float)vport->Width * 0.5f;
>      pvport.scale[1] = (float)vport->Height * -0.5f;
>      pvport.scale[2] = vport->MaxZ - vport->MinZ;
> -    pvport.scale[3] = 1.0f;
>      pvport.translate[0] = (float)vport->Width * 0.5f + (float)vport->X;
>      pvport.translate[1] = (float)vport->Height * 0.5f + (float)vport->Y;
>      pvport.translate[2] = vport->MinZ;
> -    pvport.translate[3] = 0.0f;
>
>      pipe->set_viewport_states(pipe, 0, 1, &pvport);
>  }
> --
> 2.1.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-stable mailing list