[Mesa-dev,06/16] mesa: Fix a "1" vs "i" typo in MVP setup.

Submitted by Eric Anholt on May 28, 2014, 6:37 p.m.

Details

Message ID 1401302267-5038-7-git-send-email-eric@anholt.net
State New
Headers show

Not browsing as part of any series.

Commit Message

Eric Anholt May 28, 2014, 6:37 p.m.
It doesn't matter, because the instructions were initialized to noop
swizzles anyway.
---
 src/mesa/program/programopt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/mesa/program/programopt.c b/src/mesa/program/programopt.c
index 92a8831..ee822be 100644
--- a/src/mesa/program/programopt.c
+++ b/src/mesa/program/programopt.c
@@ -183,7 +183,7 @@  _mesa_insert_mvp_mad_code(struct gl_context *ctx, struct gl_vertex_program *vpro
       newInst[i].SrcReg[1].Swizzle = SWIZZLE_NOOP;
       newInst[i].SrcReg[2].File = PROGRAM_TEMPORARY;
       newInst[i].SrcReg[2].Index = hposTemp;
-      newInst[1].SrcReg[2].Swizzle = SWIZZLE_NOOP;
+      newInst[i].SrcReg[2].Swizzle = SWIZZLE_NOOP;
    }
 
    newInst[3].Opcode = OPCODE_MAD;

Comments

This should also get tagged for stable... probably 10.1 and 10.2.

On 05/28/2014 11:37 AM, Eric Anholt wrote:
> It doesn't matter, because the instructions were initialized to noop
> swizzles anyway.
> ---
>  src/mesa/program/programopt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/program/programopt.c b/src/mesa/program/programopt.c
> index 92a8831..ee822be 100644
> --- a/src/mesa/program/programopt.c
> +++ b/src/mesa/program/programopt.c
> @@ -183,7 +183,7 @@ _mesa_insert_mvp_mad_code(struct gl_context *ctx, struct gl_vertex_program *vpro
>        newInst[i].SrcReg[1].Swizzle = SWIZZLE_NOOP;
>        newInst[i].SrcReg[2].File = PROGRAM_TEMPORARY;
>        newInst[i].SrcReg[2].Index = hposTemp;
> -      newInst[1].SrcReg[2].Swizzle = SWIZZLE_NOOP;
> +      newInst[i].SrcReg[2].Swizzle = SWIZZLE_NOOP;
>     }
>  
>     newInst[3].Opcode = OPCODE_MAD;
>
Ian Romanick <idr@freedesktop.org> writes:

> This should also get tagged for stable... probably 10.1 and 10.2.

Did you note the commit message where it said that it's a no-op change?