Commit 52ac7082 authored by Nicolai Hähnle's avatar Nicolai Hähnle

NV_vertex_program: Test whether registers are initialized to zero

Signed-off-by: Nicolai Hähnle's avatarNicolai Hähnle <nhaehnle@gmail.com>
parent fcd00af5
......@@ -139,6 +139,8 @@ vpfpgeneric['fogcoord-dp4'] = make_vpfpgeneric('fogcoord-dp4.vpfp')
vpfpgeneric['nv-mov'] = make_vpfpgeneric('nv-mov.vpfp')
vpfpgeneric['nv-add'] = make_vpfpgeneric('nv-add.vpfp')
vpfpgeneric['nv-arl'] = make_vpfpgeneric('nv-arl.vpfp')
vpfpgeneric['nv-init-zero-reg'] = make_vpfpgeneric('nv-init-zero-reg.vpfp')
vpfpgeneric['nv-init-zero-addr'] = make_vpfpgeneric('nv-init-zero-addr.vpfp')
shaders['vpfp-generic'] = vpfpgeneric
bugs = Group()
......
; The NV_vertex_program spec mandates that the address register must
; be initialized to all zero.
!!VP1.0
MOV R0, c[A0.x + 10];
ARL A0.x, v[TEX0].x;
ADD o[COL0], R0, c[A0.x + 10];
MOV R3, v[OPOS];
DP4 o[HPOS].x, c[0], R3;
DP4 o[HPOS].y, c[1], R3;
DP4 o[HPOS].z, c[2], R3;
DP4 o[HPOS].w, c[3], R3;
END
!!ARBfp1.0
MOV result.color, fragment.color;
END
!!test
NVparameter[10] 0.1 0.4 0.7 0.1
NVparameter[11] 0.2 0.2 -0.3 0.1
texcoord[0] 1 0 0 0
expected 0.3 0.6 0.4 0.2
!!test
NVparameter[10] 0.6 0.2 0.5 0.3
; use NVparameter[11] from previous test
texcoord[0] 1 0 0 0
expected 0.8 0.4 0.2 0.4
; The NV_vertex_program spec mandates that temporary registers must
; be initialized to all zero.
!!VP1.0
ADD R0, R0, R1;
ADD R0, R0, R2;
ADD R0, R0, R3;
ADD R0, R0, R4;
ADD R0, R0, R5;
ADD R0, R0, R6;
ADD R0, R0, R7;
ADD R0, R0, R8;
ADD R0, R0, R9;
ADD R0, R0, R10;
ADD R0, R0, R11;
ADD o[COL0], R0, v[TEX0];
MOV R3, v[OPOS];
DP4 o[HPOS].x, c[0], R3;
DP4 o[HPOS].y, c[1], R3;
DP4 o[HPOS].z, c[2], R3;
DP4 o[HPOS].w, c[3], R3;
END
!!ARBfp1.0
MOV result.color, fragment.color;
END
!!test
texcoord[0] 0.1 0.4 0.7 0.1
expected 0.1 0.4 0.7 0.1
!!test
texcoord[0] 0.6 0.2 0.2 0.3
expected 0.6 0.2 0.2 0.3
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment