From a8a4ad452ee3b7c99737cee053f849f3b5039988 Mon Sep 17 00:00:00 2001 From: Karl Rasche Date: Tue, 9 Dec 2003 18:17:04 +0000 Subject: [PATCH] added parsing exercises for ARL and relative offsets in ARB_vp --- progs/tests/arbvptest1.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/progs/tests/arbvptest1.c b/progs/tests/arbvptest1.c index 65f693a226c..62c37c1d9a1 100644 --- a/progs/tests/arbvptest1.c +++ b/progs/tests/arbvptest1.c @@ -105,7 +105,7 @@ static void Init( void ) "MUL R0, R0, vertex.normal; \n" "MUL R0, R0, program.local[64].z; \n" "ADD R1, vertex.position, -R0; # perturb object space position\n" - "DP4 result.position.x, state.matrix.mvp.row[0], R1; \n" + "DP4 result.position.x, state.matrix.mvp.row[3], R1; \n" "DP4 result.position.y, state.matrix.mvp.row[1], R1; \n" "DP4 result.position.z, state.matrix.mvp.row[2], R1; \n" "DP4 result.position.w, state.matrix.mvp.row[3], R1; \n" @@ -129,25 +129,22 @@ static void Init( void ) "END\n"; static const char *prog4 = "!!ARBvp1.0\n" - "TEMP R2, R3\n" - "DP4 R2, R3, program.local[A0.x];\n" -#if 0 - "DP4 R2, R3, program.local[A0.x + 5];\n" - "DP4 result.position, R3, program.local[A0.x - 4];\n" -#else + "TEMP R2, R3;\n" + "PARAM foo = {0., 0., 0., 1.};\n" + "PARAM blah[] = { program.local[0..8] };\n" + "ADDRESS A0;\n" + "ARL A0.x, foo.x;\n" + "DP4 R2, R3, blah[A0.x].x;\n" + "DP4 R2, R3, blah[A0.x + 5];\n" + "DP4 result.position, R3, blah[A0.x - 4];\n" "END\n"; -#endif glGenProgramsNV(4, prognum); load_program(prog1, prognum[0]); load_program(prog2, prognum[1]); load_program(prog3, prognum[2]); - - /* - * XXX: Don't have relative offsets working yet load_program(prog4, prognum[3]); - */ } -- 2.30.2