From: Brian Date: Fri, 12 Oct 2007 22:11:58 +0000 (-0600) Subject: change exec_kilp() to only touch lowest four bits in kilmask X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4becfdfdd871bba5304d87159892a0ff9df222b8;p=mesa.git change exec_kilp() to only touch lowest four bits in kilmask --- diff --git a/src/mesa/pipe/tgsi/exec/tgsi_exec.c b/src/mesa/pipe/tgsi/exec/tgsi_exec.c index fda5584cf39..4a608c445e8 100644 --- a/src/mesa/pipe/tgsi/exec/tgsi_exec.c +++ b/src/mesa/pipe/tgsi/exec/tgsi_exec.c @@ -1137,9 +1137,9 @@ static void exec_kilp(struct tgsi_exec_machine *mach, const struct tgsi_full_instruction *inst) { - GLuint uniquemask; + GLbitfield uniquemask; GLuint chan_index; - GLuint kilmask = 0; + GLbitfield kilmask = 0; /* bit 0 = pixel 0, bit 1 = pixel 1, etc */ union tgsi_exec_channel r[1]; /* This mask stores component bits that were already tested. Note that @@ -1165,7 +1165,7 @@ exec_kilp(struct tgsi_exec_machine *mach, FETCH(&r[0], 0, chan_index); for (i = 0; i < 4; i++) if (r[0].f[i] < 0.0f) - kilmask |= 1 << (i * 4); + kilmask |= 1 << i; } mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] |= kilmask;