summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2005-05-25 13:20:59 +0000
committerMichal Krol <[email protected]>2005-05-25 13:20:59 +0000
commit3f6d9857532ee5161ae4032f9aa3d9d375c1b43a (patch)
tree3bc9770b7046b90896653332f6919cd83dece516 /src
parent49109d01c00d4f18de57c919256dec1804ebb903 (diff)
change the behaviour of enter and local_addr instructions
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/slang/slang_execute.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/shader/slang/slang_execute.c b/src/mesa/shader/slang/slang_execute.c
index e2bdd246e37..9e82ef580bf 100644
--- a/src/mesa/shader/slang/slang_execute.c
+++ b/src/mesa/shader/slang/slang_execute.c
@@ -116,10 +116,10 @@ static void dump_instruction (FILE *f, slang_assembly *a, unsigned int i)
fprintf (f, "addr_deref");
break;
case slang_asm_addr_add:
- fprintf (f, "address_add");
+ fprintf (f, "addr_add");
break;
case slang_asm_addr_multiply:
- fprintf (f, "address_multiply");
+ fprintf (f, "addr_multiply");
break;
case slang_asm_jump:
fprintf (f, "jump\t%u", a->param[0]);
@@ -155,7 +155,7 @@ static void dump_instruction (FILE *f, slang_assembly *a, unsigned int i)
fprintf (f, "exit");
break;
default:
- break;
+ break;
}
fprintf (f, "\n");
@@ -306,7 +306,7 @@ fflush (f);
case slang_asm_enter:
mach.sp--;
mach.stack._addr[mach.sp] = mach.bp;
- mach.bp = mach.sp + a->param[0] / 4 + 1;
+ mach.bp = mach.sp + a->param[0] / 4;
break;
case slang_asm_leave:
mach.bp = mach.stack._addr[mach.sp];
@@ -321,7 +321,7 @@ fflush (f);
case slang_asm_local_addr:
mach.sp--;
mach.stack._addr[mach.sp] = (GLuint) mach.stack._addr + mach.bp * 4 -
- (a->param[0] + a->param[1]);
+ (a->param[0] + a->param[1]) + 4;
break;
case slang_asm_call:
mach.sp--;