mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
added parsing exercises for ARL and relative offsets in ARB_vp
This commit is contained in:
parent
ff10a796fe
commit
a8a4ad452e
1 changed files with 9 additions and 12 deletions
|
|
@ -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]);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue