From: Corbin Simpson Date: Mon, 18 Aug 2008 23:38:21 +0000 (-0700) Subject: r5xx: Enable fog options. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=12e84a8b84c331d0afef63e6119fe356c84bf383;p=mesa.git r5xx: Enable fog options. This uses fog HW instead of fragment programs. If it breaks you, let me know! --- 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);