summaryrefslogtreecommitdiff
path: root/src/mesa/pipe
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-06-15 10:50:48 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-06-15 10:50:48 -0600
commitfde755aefb3559731a734110c7172badee9f14f9 (patch)
tree59ece56452acdd4dacb3ed0850b6cbbf2125dff2 /src/mesa/pipe
parent8f6b6eed35832733674372dea7bd5ce69a965c4e (diff)
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.
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_state_clip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/pipe/softpipe/sp_state_clip.c b/src/mesa/pipe/softpipe/sp_state_clip.c
index 6e83b055fb..4b83f2b07e 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.