mesa: simplify texture combine state copying in _mesa_copy_texture_state()
authorBrian Paul <brianp@vmware.com>
Sun, 22 Feb 2009 21:20:16 +0000 (14:20 -0700)
committerBrian Paul <brianp@vmware.com>
Sun, 22 Feb 2009 22:39:54 +0000 (15:39 -0700)
Just copy the whole struct.

src/mesa/main/texstate.c

index c4ca7c4a199c47ae60c1a854d75fe3d5e0380355..5df76983aa8eb0886e4107aab3c9504011ccc2f3 100644 (file)
@@ -92,14 +92,7 @@ _mesa_copy_texture_state( const GLcontext *src, GLcontext *dst )
       dst->Texture.Unit[i].LodBias = src->Texture.Unit[i].LodBias;
 
       /* GL_EXT_texture_env_combine */
-      dst->Texture.Unit[i].Combine.ModeRGB = src->Texture.Unit[i].Combine.ModeRGB;
-      dst->Texture.Unit[i].Combine.ModeA = src->Texture.Unit[i].Combine.ModeA;
-      COPY_3V(dst->Texture.Unit[i].Combine.SourceRGB, src->Texture.Unit[i].Combine.SourceRGB);
-      COPY_3V(dst->Texture.Unit[i].Combine.SourceA, src->Texture.Unit[i].Combine.SourceA);
-      COPY_3V(dst->Texture.Unit[i].Combine.OperandRGB, src->Texture.Unit[i].Combine.OperandRGB);
-      COPY_3V(dst->Texture.Unit[i].Combine.OperandA, src->Texture.Unit[i].Combine.OperandA);
-      dst->Texture.Unit[i].Combine.ScaleShiftRGB = src->Texture.Unit[i].Combine.ScaleShiftRGB;
-      dst->Texture.Unit[i].Combine.ScaleShiftA = src->Texture.Unit[i].Combine.ScaleShiftA;
+      dst->Texture.Unit[i].Combine = src->Texture.Unit[i].Combine;
 
       /* copy texture object bindings, not contents of texture objects */
       _mesa_lock_context_textures(dst);