From: Xiang, Haihao Date: Fri, 15 Feb 2008 08:13:11 +0000 (+0800) Subject: i965: don't swizzle fogcoord if FogOption is FOG_NONE. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=83068115e2104b1880431ada96fa37e632149a86;p=mesa.git i965: don't swizzle fogcoord if FogOption is FOG_NONE. fix #10788 issue on 965. --- diff --git a/src/mesa/drivers/dri/i965/brw_vs_tnl.c b/src/mesa/drivers/dri/i965/brw_vs_tnl.c index b8231fc1d2f..d58fd4c0da2 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_tnl.c +++ b/src/mesa/drivers/dri/i965/brw_vs_tnl.c @@ -1172,6 +1172,11 @@ static void build_fog( struct tnl_program *p ) } else { input = swizzle1(register_input(p, VERT_ATTRIB_FOG), X); + if (p->state->fog_option && + p->state->tnl_do_vertex_fog) + input = swizzle1(register_input(p, VERT_ATTRIB_FOG), X); + else + input = register_input(p, VERT_ATTRIB_FOG); } if (p->state->fog_option &&