Lines Matching refs:attr

134       struct gl_enable_attrib_node *attr = &head->Enable;
138 attr->AlphaTest = ctx->Color.AlphaEnabled;
139 attr->AutoNormal = ctx->Eval.AutoNormal;
140 attr->Blend = ctx->Color.BlendEnabled;
141 attr->ClipPlanes = ctx->Transform.ClipPlanesEnabled;
142 attr->ColorMaterial = ctx->Light.ColorMaterialEnabled;
143 attr->CullFace = ctx->Polygon.CullFlag;
144 attr->DepthClampNear = ctx->Transform.DepthClampNear;
145 attr->DepthClampFar = ctx->Transform.DepthClampFar;
146 attr->DepthTest = ctx->Depth.Test;
147 attr->Dither = ctx->Color.DitherFlag;
148 attr->Fog = ctx->Fog.Enabled;
150 attr->Light[i] = ctx->Light.Light[i].Enabled;
152 attr->Lighting = ctx->Light.Enabled;
153 attr->LineSmooth = ctx->Line.SmoothFlag;
154 attr->LineStipple = ctx->Line.StippleFlag;
155 attr->IndexLogicOp = ctx->Color.IndexLogicOpEnabled;
156 attr->ColorLogicOp = ctx->Color.ColorLogicOpEnabled;
157 attr->Map1Color4 = ctx->Eval.Map1Color4;
158 attr->Map1Index = ctx->Eval.Map1Index;
159 attr->Map1Normal = ctx->Eval.Map1Normal;
160 attr->Map1TextureCoord1 = ctx->Eval.Map1TextureCoord1;
161 attr->Map1TextureCoord2 = ctx->Eval.Map1TextureCoord2;
162 attr->Map1TextureCoord3 = ctx->Eval.Map1TextureCoord3;
163 attr->Map1TextureCoord4 = ctx->Eval.Map1TextureCoord4;
164 attr->Map1Vertex3 = ctx->Eval.Map1Vertex3;
165 attr->Map1Vertex4 = ctx->Eval.Map1Vertex4;
166 attr->Map2Color4 = ctx->Eval.Map2Color4;
167 attr->Map2Index = ctx->Eval.Map2Index;
168 attr->Map2Normal = ctx->Eval.Map2Normal;
169 attr->Map2TextureCoord1 = ctx->Eval.Map2TextureCoord1;
170 attr->Map2TextureCoord2 = ctx->Eval.Map2TextureCoord2;
171 attr->Map2TextureCoord3 = ctx->Eval.Map2TextureCoord3;
172 attr->Map2TextureCoord4 = ctx->Eval.Map2TextureCoord4;
173 attr->Map2Vertex3 = ctx->Eval.Map2Vertex3;
174 attr->Map2Vertex4 = ctx->Eval.Map2Vertex4;
175 attr->Normalize = ctx->Transform.Normalize;
176 attr->RasterPositionUnclipped = ctx->Transform.RasterPositionUnclipped;
177 attr->PointSmooth = ctx->Point.SmoothFlag;
178 attr->PointSprite = ctx->Point.PointSprite;
179 attr->PolygonOffsetPoint = ctx->Polygon.OffsetPoint;
180 attr->PolygonOffsetLine = ctx->Polygon.OffsetLine;
181 attr->PolygonOffsetFill = ctx->Polygon.OffsetFill;
182 attr->PolygonSmooth = ctx->Polygon.SmoothFlag;
183 attr->PolygonStipple = ctx->Polygon.StippleFlag;
184 attr->RescaleNormals = ctx->Transform.RescaleNormals;
185 attr->Scissor = ctx->Scissor.EnableFlags;
186 attr->Stencil = ctx->Stencil.Enabled;
187 attr->StencilTwoSide = ctx->Stencil.TestTwoSide;
188 attr->MultisampleEnabled = ctx->Multisample.Enabled;
189 attr->SampleAlphaToCoverage = ctx->Multisample.SampleAlphaToCoverage;
190 attr->SampleAlphaToOne = ctx->Multisample.SampleAlphaToOne;
191 attr->SampleCoverage = ctx->Multisample.SampleCoverage;
193 attr->Texture[i] = ctx->Texture.FixedFuncUnit[i].Enabled;
194 attr->TexGen[i] = ctx->Texture.FixedFuncUnit[i].TexGenEnabled;
197 attr->VertexProgram = ctx->VertexProgram.Enabled;
198 attr->VertexProgramPointSize = ctx->VertexProgram.PointSizeEnabled;
199 attr->VertexProgramTwoSide = ctx->VertexProgram.TwoSideEnabled;
202 attr->FragmentProgram = ctx->FragmentProgram.Enabled;
205 attr->sRGBEnabled = ctx->Color.sRGBEnabled;
208 attr->ConservativeRasterization = ctx->ConservativeRasterization;
644 if (ctx->FIELD != attr->FIELD) \
645 _mesa_##CALL(attr->FIELD); \
649 if (ctx->FIELD != attr->FIELD) \
650 _mesa_##CALL(SEL, attr->FIELD); \
654 if (ctx->FIELD1 != attr->FIELD1 || ctx->FIELD2 != attr->FIELD2) \
655 _mesa_##CALL(attr->FIELD1, attr->FIELD2); \
672 struct gl_attrib_node *attr;
682 attr = ctx->AttribStack[ctx->AttribStackDepth];
684 unsigned mask = attr->Mask;
696 _mesa_ClearAccum(attr->Accum.ClearColor[0],
697 attr->Accum.ClearColor[1],
698 attr->Accum.ClearColor[2],
699 attr->Accum.ClearColor[3]);
704 _mesa_ClearColor(attr->Color.ClearColor.f[0],
705 attr->Color.ClearColor.f[1],
706 attr->Color.ClearColor.f[2],
707 attr->Color.ClearColor.f[3]);
709 if (ctx->Color.ColorMask != attr->Color.ColorMask) {
711 _mesa_ColorMask(GET_COLORMASK_BIT(attr->Color.ColorMask, 0, 0),
712 GET_COLORMASK_BIT(attr->Color.ColorMask, 0, 1),
713 GET_COLORMASK_BIT(attr->Color.ColorMask, 0, 2),
714 GET_COLORMASK_BIT(attr->Color.ColorMask, 0, 3));
718 GET_COLORMASK_BIT(attr->Color.ColorMask, i, 0),
719 GET_COLORMASK_BIT(attr->Color.ColorMask, i, 1),
720 GET_COLORMASK_BIT(attr->Color.ColorMask, i, 2),
721 GET_COLORMASK_BIT(attr->Color.ColorMask, i, 3));
725 if (memcmp(ctx->Color.DrawBuffer, attr->Color.DrawBuffer,
726 sizeof(attr->Color.DrawBuffer))) {
737 if (attr->Color.DrawBuffer[i] != GL_NONE) {
753 buffers[i] = attr->Color.DrawBuffer[i];
757 _mesa_DrawBuffer(attr->Color.DrawBuffer[0]);
760 TEST_AND_UPDATE(ctx->Color.AlphaEnabled, attr->Color.AlphaEnabled,
763 if (ctx->Color.BlendEnabled != attr->Color.BlendEnabled) {
767 attr->Color.BlendEnabled, i, GL_BLEND);
772 attr->Color.BlendEnabled & 0x1, GL_BLEND);
780 _mesa_BlendFuncSeparateiARB(buf, attr->Color.Blend[buf].SrcRGB,
781 attr->Color.Blend[buf].DstRGB,
782 attr->Color.Blend[buf].SrcA,
783 attr->Color.Blend[buf].DstA);
785 attr->Color.Blend[buf].EquationRGB,
786 attr->Color.Blend[buf].EquationA);
791 _mesa_BlendFuncSeparate(attr->Color.Blend[0].SrcRGB,
792 attr->Color.Blend[0].DstRGB,
793 attr->Color.Blend[0].SrcA,
794 attr->Color.Blend[0].DstA);
798 if (attr->Color.Blend[0].EquationRGB ==
799 attr->Color.Blend[0].EquationA) {
807 _mesa_BlendColor(attr->Color.BlendColorUnclamped[0],
808 attr->Color.BlendColorUnclamped[1],
809 attr->Color.BlendColorUnclamped[2],
810 attr->Color.BlendColorUnclamped[3]);
813 attr->Color.ColorLogicOpEnabled, GL_COLOR_LOGIC_OP);
815 attr->Color.IndexLogicOpEnabled, GL_INDEX_LOGIC_OP);
816 TEST_AND_UPDATE(ctx->Color.DitherFlag, attr->Color.DitherFlag,
828 TEST_AND_UPDATE(ctx->Color.sRGBEnabled, attr->Color.sRGBEnabled,
834 memcpy(&ctx->Current, &attr->Current,
842 TEST_AND_UPDATE(ctx->Depth.Test, attr->Depth.Test, GL_DEPTH_TEST);
845 TEST_AND_UPDATE(ctx->Depth.BoundsTest, attr->Depth.BoundsTest,
852 pop_enable_group(ctx, &attr->Enable);
855 memcpy(&ctx->Eval, &attr->Eval, sizeof(struct gl_eval_attrib));
860 TEST_AND_UPDATE(ctx->Fog.Enabled, attr->Fog.Enabled, GL_FOG);
861 _mesa_Fogfv(GL_FOG_COLOR, attr->Fog.Color);
881 TEST_AND_UPDATE(ctx->Light.Enabled, attr->Light.Enabled, GL_LIGHTING);
889 memcpy(ctx->Light.LightSource, attr->Light.LightSource,
890 sizeof(attr->Light.LightSource));
891 memcpy(&ctx->Light.Model, &attr->Light.Model,
892 sizeof(attr->Light.Model));
896 attr->Light.Light[i].Enabled,
898 memcpy(&ctx->Light.Light[i], &attr->Light.Light[i],
907 attr->Light.ColorMaterialEnabled, GL_COLOR_MATERIAL);
910 memcpy(&ctx->Light.Material, &attr->Light.Material,
918 TEST_AND_UPDATE(ctx->Line.SmoothFlag, attr->Line.SmoothFlag, GL_LINE_SMOOTH);
919 TEST_AND_UPDATE(ctx->Line.StippleFlag, attr->Line.StippleFlag, GL_LINE_STIPPLE);
925 memcpy(&ctx->List, &attr->List, sizeof(struct gl_list_attrib));
928 memcpy(&ctx->Pixel, &attr->Pixel, sizeof(struct gl_pixel_attrib));
936 TEST_AND_UPDATE(ctx->Point.SmoothFlag, attr->Point.SmoothFlag, GL_POINT_SMOOTH);
937 _mesa_PointParameterfv(GL_DISTANCE_ATTENUATION_EXT, attr->Point.Params);
943 if (ctx->Point.CoordReplace != attr->Point.CoordReplace) {
945 ctx->Point.CoordReplace = attr->Point.CoordReplace;
947 TEST_AND_UPDATE(ctx->Point.PointSprite, attr->Point.PointSprite,
962 attr->Polygon.OffsetFactor,
963 attr->Polygon.OffsetUnits,
964 attr->Polygon.OffsetClamp);
965 TEST_AND_UPDATE(ctx->Polygon.SmoothFlag, attr->Polygon.SmoothFlag, GL_POLYGON_SMOOTH);
966 TEST_AND_UPDATE(ctx->Polygon.StippleFlag, attr->Polygon.StippleFlag, GL_POLYGON_STIPPLE);
967 TEST_AND_UPDATE(ctx->Polygon.CullFlag, attr->Polygon.CullFlag, GL_CULL_FACE);
968 TEST_AND_UPDATE(ctx->Polygon.OffsetPoint, attr->Polygon.OffsetPoint,
970 TEST_AND_UPDATE(ctx->Polygon.OffsetLine, attr->Polygon.OffsetLine,
972 TEST_AND_UPDATE(ctx->Polygon.OffsetFill, attr->Polygon.OffsetFill,
977 memcpy(ctx->PolygonStipple, attr->PolygonStipple, 32*sizeof(GLuint));
987 attr->Scissor.ScissorArray[i].X,
988 attr->Scissor.ScissorArray[i].Y,
989 attr->Scissor.ScissorArray[i].Width,
990 attr->Scissor.ScissorArray[i].Height);
992 attr->Scissor.EnableFlags, i, GL_SCISSOR_TEST);
998 attr->Scissor.WindowRectMode, attr->Scissor.NumWindowRects,
999 (const GLint *)attr->Scissor.WindowRects);
1004 TEST_AND_UPDATE(ctx->Stencil.Enabled, attr->Stencil.Enabled,
1008 TEST_AND_UPDATE(ctx->Stencil.TestTwoSide, attr->Stencil.TestTwoSide,
1010 _mesa_ActiveStencilFaceEXT(attr->Stencil.ActiveFace
1015 attr->Stencil.Function[0],
1016 attr->Stencil.Ref[0],
1017 attr->Stencil.ValueMask[0]);
1019 _mesa_StencilOpSeparate(GL_FRONT, attr->Stencil.FailFunc[0],
1020 attr->Stencil.ZFailFunc[0],
1021 attr->Stencil.ZPassFunc[0]);
1024 attr->Stencil.Function[1],
1025 attr->Stencil.Ref[1],
1026 attr->Stencil.ValueMask[1]);
1028 _mesa_StencilOpSeparate(GL_BACK, attr->Stencil.FailFunc[1],
1029 attr->Stencil.ZFailFunc[1],
1030 attr->Stencil.ZPassFunc[1]);
1044 const GLfloat *eyePlane = attr->Transform.EyeUserPlane[i];
1047 attr->Transform.ClipPlanesEnabled, i,
1052 TEST_AND_UPDATE(ctx->Transform.Normalize, attr->Transform.Normalize,
1055 attr->Transform.RescaleNormals, GL_RESCALE_NORMAL_EXT);
1060 attr->Transform.DepthClampNear &&
1061 attr->Transform.DepthClampFar, GL_DEPTH_CLAMP);
1064 attr->Transform.DepthClampNear,
1067 attr->Transform.DepthClampFar,
1078 pop_texture_group(ctx, &attr->Texture);
1087 const struct gl_viewport_attrib *vp = &attr->Viewport.ViewportArray[i];
1101 GLuint biasx = attr->Viewport.SubpixelPrecisionBias[0];
1102 GLuint biasy = attr->Viewport.SubpixelPrecisionBias[1];
1109 attr->Multisample.Enabled,
1113 attr->Multisample.SampleCoverage,
1117 attr->Multisample.SampleAlphaToCoverage,
1121 attr->Multisample.SampleAlphaToOne,
1131 ctx->PopAttribState = attr->OldPopAttribStateMask;