From 12e84a8b84c331d0afef63e6119fe356c84bf383 Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Mon, 18 Aug 2008 16:38:21 -0700 Subject: [PATCH] r5xx: Enable fog options. This uses fog HW instead of fragment programs. If it breaks you, let me know! --- src/mesa/drivers/dri/r300/r300_state.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index cce07d338bb..d71e4f6fe9c 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -2622,6 +2622,14 @@ static void r500SetupPixelShader(r300ContextPtr rmesa) } code = &fp->code; + if (fp->mesa_program.FogOption != GL_NONE) { + /* Enable HW fog. + * (Anybody sane remembered to set glFog() opts first! */ + ctx->Fog.Enabled = GL_TRUE; + ctx->Fog.Mode = fp->mesa_program.FogOption; + r300SetFogState(ctx, GL_TRUE); + } + r300SetupTextures(ctx); R300_STATECHANGE(rmesa, fp); -- 2.30.2