[Mesa-dev] [PATCH] Mesa prog_optimize.c: solve glsl2 regression
Segovia, Benjamin
benjamin.segovia at intel.com
Tue Aug 17 12:26:13 PDT 2010
BTW, the patch is a real fix not a workaround. This is what has to be done.
Ben
________________________________________
From: mesa-dev-bounces+benjamin.segovia=intel.com at lists.freedesktop.org [mesa-dev-bounces+benjamin.segovia=intel.com at lists.freedesktop.org] On Behalf Of Segovia, Benjamin [benjamin.segovia at intel.com]
Sent: Tuesday, August 17, 2010 1:18 PM
To: Ian Romanick
Cc: mesa-dev at lists.freedesktop.org
Subject: Re: [Mesa-dev] [PATCH] Mesa prog_optimize.c: solve glsl2 regression
Yes, absolutely. The code was just wrong.
Ben
________________________________________
From: Ian Romanick [idr at freedesktop.org]
Sent: Tuesday, August 17, 2010 1:09 PM
To: Segovia, Benjamin
Cc: mesa-dev at lists.freedesktop.org
Subject: Re: [Mesa-dev] [PATCH] Mesa prog_optimize.c: solve glsl2 regression
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Benjamin Segovia wrote:
> - In one optimization pass, register files may have been messed therefore
> merging instructions which use the same index in two different register files
>
> - The fix consists in only processing temporary registers as it must be
I was just getting ready to commit this patch, but it seems the test
case is already fixed. Something in Eric's commit below makes the
problem in glsl-vs-mat-mul-1 go away.
commit 62383ae6fe5d2ca092e8f9d8dae2ba9562e03d95
Author: Eric Anholt <eric at anholt.net>
Date: Thu Jul 8 17:05:42 2010 -0700
i965: Add disasm for Compr4 instruction compression.
Do you think your patch is still necessary?
> ---
> src/mesa/program/prog_optimize.c | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/src/mesa/program/prog_optimize.c b/src/mesa/program/prog_optimize.c
> index ab87875..0dc7790 100644
> --- a/src/mesa/program/prog_optimize.c
> +++ b/src/mesa/program/prog_optimize.c
> @@ -758,7 +758,11 @@ _mesa_remove_extra_moves(struct gl_program *prog)
> nesting--;
> break;
> case OPCODE_MOV:
> - if (i > 0 && can_downward_mov_be_modifed(mov) && nesting == 0) {
> + if (i > 0 &&
> + can_downward_mov_be_modifed(mov) &&
> + mov->SrcReg[0].File == PROGRAM_TEMPORARY &&
> + nesting == 0)
> + {
>
> /* see if this MOV can be removed */
> const GLuint id = mov->SrcReg[0].Index;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkxq3msACgkQX1gOwKyEAw8coQCfQpxPW06XRV+sCdOKQFrcZ0Z4
xEUAn2JJOsFzXhZ79ncVaEDxmaLMTEnz
=dXdB
-----END PGP SIGNATURE-----
_______________________________________________
mesa-dev mailing list
mesa-dev at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list