summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2005-01-26 12:44:52 +0000
committerAlan Hourihane <alanh@tungstengraphics.com>2005-01-26 12:44:52 +0000
commit92a2712da7f93743f603fc87192a31daf5e54ba7 (patch)
treebb35fd006b70c2ac4a917913f129fa597a6b1fa8
parent43c57a2bf291d78344f2cbc4eb86fa618198ad03 (diff)
Fix flag for anti-aliased points
-rw-r--r--src/mesa/drivers/dri/unichrome/via_state.c29
1 files changed, 8 insertions, 21 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_state.c b/src/mesa/drivers/dri/unichrome/via_state.c
index dabd061508..2bf1905784 100644
--- a/src/mesa/drivers/dri/unichrome/via_state.c
+++ b/src/mesa/drivers/dri/unichrome/via_state.c
@@ -1347,15 +1347,6 @@ static void viaChooseLineState(GLcontext *ctx)
{
viaContextPtr vmesa = VIA_CONTEXT(ctx);
- if (ctx->Line.SmoothFlag) {
- vmesa->regEnable |= HC_HenAA_MASK;
- }
- else {
- if (!ctx->Polygon.SmoothFlag) {
- vmesa->regEnable &= ~HC_HenAA_MASK;
- }
- }
-
if (ctx->Line.StippleFlag) {
vmesa->regEnable |= HC_HenLP_MASK;
vmesa->regHLP = ctx->Line.StipplePattern;
@@ -1370,17 +1361,6 @@ static void viaChoosePolygonState(GLcontext *ctx)
{
viaContextPtr vmesa = VIA_CONTEXT(ctx);
- /* KW: FIXME: this should be in viaRasterPrimitive (somehow)
- */
- if (ctx->Polygon.SmoothFlag) {
- vmesa->regEnable |= HC_HenAA_MASK;
- }
- else {
- if (!ctx->Line.SmoothFlag) {
- vmesa->regEnable &= ~HC_HenAA_MASK;
- }
- }
-
if (ctx->Polygon.StippleFlag) {
vmesa->regEnable |= HC_HenSP_MASK;
}
@@ -1520,7 +1500,7 @@ static void viaChooseTriangle(GLcontext *ctx)
void viaValidateState( GLcontext *ctx )
{
viaContextPtr vmesa = VIA_CONTEXT(ctx);
-
+
if (vmesa->newState & _NEW_TEXTURE) {
GLboolean ok = (viaChooseTextureState(ctx) &&
viaUpdateTextureState(ctx));
@@ -1553,6 +1533,13 @@ void viaValidateState( GLcontext *ctx )
else
vmesa->regEnable &= ~HC_HenCS_MASK;
+ if (ctx->Point.SmoothFlag ||
+ ctx->Line.SmoothFlag ||
+ ctx->Polygon.SmoothFlag)
+ vmesa->regEnable |= HC_HenAA_MASK;
+ else
+ vmesa->regEnable &= ~HC_HenAA_MASK;
+
vmesa->newEmitState |= vmesa->newState;
vmesa->newState = 0;
}