st/nine: remove unused pipe_viewport_state::translate[3] and scale[3]
authorDavid Heidelberg <david@ixit.cz>
Mon, 24 Nov 2014 23:38:09 +0000 (00:38 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 26 Nov 2014 20:09:12 +0000 (20:09 +0000)
2efabd9f5a711a7f6cd1846630244b7814bf25b3 removed them as unused.

This caused random memory overwrites (reported by Coverity).

Cc: "10.4" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: David Heidelberg <david@ixit.cz>
src/gallium/state_trackers/nine/nine_state.c

index 6924449cb7ef51acb713f181c53107d96de47da5..37de6a304920b2436a49ffc084a4e326d4618173 100644 (file)
@@ -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);
 }