From: Brian Date: Fri, 15 Jun 2007 16:50:48 +0000 (-0600) Subject: In softpipe_set_viewport() use ordinary (struct) assignment to update softpipe->viewport. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fde755aefb3559731a734110c7172badee9f14f9;p=mesa.git In softpipe_set_viewport() use ordinary (struct) assignment to update softpipe->viewport. The previous memcpy() was incorrect since it only copied 4 bytes instead of 32. With struct assignment we avoid data size errors. --- diff --git a/src/mesa/pipe/softpipe/sp_state_clip.c b/src/mesa/pipe/softpipe/sp_state_clip.c index 6e83b055fbc..4b83f2b07ef 100644 --- a/src/mesa/pipe/softpipe/sp_state_clip.c +++ b/src/mesa/pipe/softpipe/sp_state_clip.c @@ -56,7 +56,7 @@ void softpipe_set_viewport( struct pipe_context *pipe, { struct softpipe_context *softpipe = softpipe_context(pipe); - memcpy(&softpipe->viewport, viewport, sizeof(viewport)); + softpipe->viewport = *viewport; /* struct copy */ /* Using tnl/ and vf/ modules is temporary while getting started. * Full pipe will have vertex shader, vertex fetch of its own.