--- .../instructions/abs.shader_test | 16 ++++++++++ .../instructions/add.shader_test | 17 +++++++++++ .../instructions/arl.shader_test | 35 ++++++++++++++++++++++ .../instructions/dp3.shader_test | 20 +++++++++++++ .../instructions/dp4.shader_test | 20 +++++++++++++ .../instructions/dph.shader_test | 18 +++++++++++ .../instructions/dst.shader_test | 18 +++++++++++ .../instructions/ex2.shader_test | 21 +++++++++++++ .../instructions/exp.shader_test | 18 +++++++++++ .../instructions/flr.shader_test | 18 +++++++++++ .../instructions/frc.shader_test | 15 ++++++++++ .../instructions/lg2.shader_test | 21 +++++++++++++ .../instructions/lit_degenerate_case.shader_test | 17 +++++++++++ .../instructions/lit_x_lt_0.shader_test | 16 ++++++++++ .../instructions/log.shader_test | 22 ++++++++++++++ .../instructions/mad.shader_test | 19 ++++++++++++ .../instructions/max.shader_test | 18 +++++++++++ .../instructions/min.shader_test | 17 +++++++++++ .../instructions/mov_with_swizzle.shader_test | 15 ++++++++++ .../mul_with_swizzle_and_masking.shader_test | 18 +++++++++++ .../instructions/pow_exponentiation.shader_test | 18 +++++++++++ .../instructions/rcp_reciprocal.shader_test | 18 +++++++++++ .../rsq_reciprocal_square_root.shader_test | 18 +++++++++++ ...rocal_square_root_of_negative_value.shader_test | 18 +++++++++++ .../instructions/sge.shader_test | 18 +++++++++++ .../instructions/slt.shader_test | 18 +++++++++++ .../instructions/sub_with_swizzle.shader_test | 17 +++++++++++ .../instructions/swz.shader_test | 16 ++++++++++ .../instructions/swz_constant.shader_test | 16 ++++++++++ .../instructions/swz_negative.shader_test | 16 ++++++++++ .../instructions/swz_src_and_constants.shader_test | 16 ++++++++++ .../swz_src_negative_and_constants.shader_test | 16 ++++++++++ .../instructions/xpd.shader_test | 18 +++++++++++ .../xpd_same_src_and_dst_arg.shader_test | 21 +++++++++++++ 34 files changed, 623 insertions(+) create mode 100644 tests/spec/arb_vertex_program/instructions/abs.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/add.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/arl.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/dp3.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/dp4.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/dph.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/dst.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/ex2.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/exp.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/flr.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/frc.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/lg2.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/lit_degenerate_case.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/lit_x_lt_0.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/log.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/mad.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/max.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/min.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/mov_with_swizzle.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/mul_with_swizzle_and_masking.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/pow_exponentiation.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/rcp_reciprocal.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/rsq_reciprocal_square_root.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/rsq_reciprocal_square_root_of_negative_value.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/sge.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/slt.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/sub_with_swizzle.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/swz.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/swz_constant.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/swz_negative.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/swz_src_and_constants.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/swz_src_negative_and_constants.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/xpd.shader_test create mode 100644 tests/spec/arb_vertex_program/instructions/xpd_same_src_and_dst_arg.shader_test
diff --git a/tests/spec/arb_vertex_program/instructions/abs.shader_test b/tests/spec/arb_vertex_program/instructions/abs.shader_test new file mode 100644 index 0000000..4601751 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/abs.shader_test @@ -0,0 +1,16 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p2 = program.local[2]; +MOV result.position, vertex.position; +ABS result.color, p2; +END + +[test] +ortho -4 4 -4 4 +parameter local_vp 2 (-1.0, 0.0, 0.25, -0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (1.0, 0.0, 0.25, 0.5) diff --git a/tests/spec/arb_vertex_program/instructions/add.shader_test b/tests/spec/arb_vertex_program/instructions/add.shader_test new file mode 100644 index 0000000..5e9c93d --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/add.shader_test @@ -0,0 +1,17 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p = program.local[1]; +MOV result.position, vertex.position; +ADD result.color, vertex.color, p; +END + +[test] +ortho -4 4 -4 4 +color 0.25 0.75 0.5 0.25 +parameter local_vp 1 (0.5, 0.25, 0.9, 0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.75, 1.0, 1.0, 0.75) diff --git a/tests/spec/arb_vertex_program/instructions/arl.shader_test b/tests/spec/arb_vertex_program/instructions/arl.shader_test new file mode 100644 index 0000000..7119277 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/arl.shader_test @@ -0,0 +1,35 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +ADDRESS addr; +PARAM indexes = {-1, 0, 1, 2}; +PARAM myArray[4] = {{0.11, 0.12, 0.13, 0.14}, +{0.21, 0.22, 0.23, 0.24}, +{0.31, 0.32, 0.33, 0.34}, +{0.41, 0.42, 0.43, 0.44}}; +MOV result.position, vertex.position; + +# Load ARL with -1, get array[0].x +ARL addr.x, indexes.x; +MOV result.color.x, myArray[addr.x + 1]; + +# Load ARL with 0, get array[1].y +ARL addr.x, indexes.y; +MOV result.color.y, myArray[addr.x + 1]; + +# Load ARL with 1, get array[2].z +ARL addr.x, indexes.z; +MOV result.color.z, myArray[addr.x + 1]; + +# Load ARL with 2, get array[3].w +ARL addr.x, indexes.w; +MOV result.color.w, myArray[addr.x + 1]; +END + +[test] +ortho -4 4 -4 4 +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.11, 0.22, 0.33, 0.44) diff --git a/tests/spec/arb_vertex_program/instructions/dp3.shader_test b/tests/spec/arb_vertex_program/instructions/dp3.shader_test new file mode 100644 index 0000000..d774725 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/dp3.shader_test @@ -0,0 +1,20 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p2 = program.local[2]; +PARAM bias = { 0.5, 0.5, 0.5, 0.5 }; +TEMP t; +MOV result.position, vertex.position; +DP3 t, p2, vertex.color; +ADD result.color, t, bias; +END + +[test] +ortho -4 4 -4 4 +color 0.25 0.75 0.5 0.25 +parameter local_vp 2 (-1.0, 0.0, 0.25, -0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.375, 0.375, 0.375, 0.375) diff --git a/tests/spec/arb_vertex_program/instructions/dp4.shader_test b/tests/spec/arb_vertex_program/instructions/dp4.shader_test new file mode 100644 index 0000000..c729980 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/dp4.shader_test @@ -0,0 +1,20 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p2 = program.local[2]; +PARAM bias = { 0.5, 0.5, 0.5, 0.5 }; +TEMP t; +MOV result.position, vertex.position; +DP4 t, p2, vertex.color; +ADD result.color, t, bias; +END + +[test] +ortho -4 4 -4 4 +color 0.25 0.75 0.5 0.25 +parameter local_vp 2 (-1.0, 0.0, 0.25, -0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.25, 0.25, 0.25, 0.25) diff --git a/tests/spec/arb_vertex_program/instructions/dph.shader_test b/tests/spec/arb_vertex_program/instructions/dph.shader_test new file mode 100644 index 0000000..60c022c --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/dph.shader_test @@ -0,0 +1,18 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p2 = program.local[2]; +TEMP t; +MOV result.position, vertex.position; +DPH result.color, p2, vertex.color; +END + +[test] +ortho -4 4 -4 4 +color 0.25 0.75 0.5 0.25 +parameter local_vp 2 (-1.0, 0.0, 0.25, -0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.125, 0.125, 0.125, 0.125) diff --git a/tests/spec/arb_vertex_program/instructions/dst.shader_test b/tests/spec/arb_vertex_program/instructions/dst.shader_test new file mode 100644 index 0000000..c18ae5b --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/dst.shader_test @@ -0,0 +1,18 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +# let d = 0.4 +PARAM v1 = {9.9, 0.16, 0.16, 9.9}; +PARAM v2 = {9.9, 2.5, 9.9, 2.5}; +MOV result.position, vertex.position; +DST result.color, v1, v2; +END + +[test] +ortho -4 4 -4 4 +draw rect -0.25 -0.25 0.5 0.5 +# 1, v1.y * v2.y, v1.z, v2.w +relative probe rgba (0.5, 0.5) (1.0, 0.4, 0.16, 1.0) diff --git a/tests/spec/arb_vertex_program/instructions/ex2.shader_test b/tests/spec/arb_vertex_program/instructions/ex2.shader_test new file mode 100644 index 0000000..fc0c9d6 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/ex2.shader_test @@ -0,0 +1,21 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM scale = {0.01, 0.01, 0.01, 0.01}; +PARAM values = {0.0, 1.0, 4.0, -2.0 }; +TEMP t; +MOV result.position, vertex.position; +EX2 t.x, values.x; +EX2 t.y, values.y; +EX2 t.z, values.z; +EX2 t.w, values.w; +MUL result.color, t, scale; +END + +[test] +ortho -4 4 -4 4 +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.01, 0.02, 0.16, 0.0025) diff --git a/tests/spec/arb_vertex_program/instructions/exp.shader_test b/tests/spec/arb_vertex_program/instructions/exp.shader_test new file mode 100644 index 0000000..24d8b61 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/exp.shader_test @@ -0,0 +1,18 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM scale = {0.01, 0.01, 0.01, 0.01}; +PARAM values = {4.5, 0, 0, 0}; +TEMP t; +MOV result.position, vertex.position; +EXP t, values.x; +MUL result.color, t, scale; +END + +[test] +ortho -4 4 -4 4 +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.16, 0.005, 0.22627, 0.01) diff --git a/tests/spec/arb_vertex_program/instructions/flr.shader_test b/tests/spec/arb_vertex_program/instructions/flr.shader_test new file mode 100644 index 0000000..aac4a64 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/flr.shader_test @@ -0,0 +1,18 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM values = {4.8, 0.3, -0.2, 1.2}; +PARAM scale = {0.1, 0.1, 0.1, 0.1}; +MOV result.position, vertex.position; +TEMP t; +FLR t, values; +MUL result.color, t, scale; +END + +[test] +ortho -4 4 -4 4 +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.4, 0.0, 0.0, 0.1) diff --git a/tests/spec/arb_vertex_program/instructions/frc.shader_test b/tests/spec/arb_vertex_program/instructions/frc.shader_test new file mode 100644 index 0000000..212e44f --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/frc.shader_test @@ -0,0 +1,15 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM values = {1.344, -1.5, -10.1, 4.2}; +MOV result.position, vertex.position; +FRC result.color, values; +END + +[test] +ortho -4 4 -4 4 +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.344, 0.5, 0.9, 0.2) diff --git a/tests/spec/arb_vertex_program/instructions/lg2.shader_test b/tests/spec/arb_vertex_program/instructions/lg2.shader_test new file mode 100644 index 0000000..b3a868c --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/lg2.shader_test @@ -0,0 +1,21 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM values = {64.0, 1, 30, 4}; +PARAM scale = {0.1, 0.1, 0.1, 0.1}; +MOV result.position, vertex.position; +TEMP t; +LG2 t.x, values.x; +LG2 t.y, values.y; +LG2 t.z, values.z; +LG2 t.w, values.w; +MUL result.color, t, scale; +END + +[test] +ortho -4 4 -4 4 +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.6, 0.0, 0.49, 0.2) diff --git a/tests/spec/arb_vertex_program/instructions/lit_degenerate_case.shader_test b/tests/spec/arb_vertex_program/instructions/lit_degenerate_case.shader_test new file mode 100644 index 0000000..2c1013b --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/lit_degenerate_case.shader_test @@ -0,0 +1,17 @@ +# test that pow(0, 0) evaluates to 1. +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM values = {0.65, 0.0, 0.0, 0.0}; +MOV result.position, vertex.position; +LIT result.color, values; +END + +[test] +ortho -4 4 -4 4 +draw rect -0.25 -0.25 0.5 0.5 +# 1, values.x, 0^0, 1 +relative probe rgba (0.5, 0.5) (1.0, 0.65, 1.0, 1.0) diff --git a/tests/spec/arb_vertex_program/instructions/lit_x_lt_0.shader_test b/tests/spec/arb_vertex_program/instructions/lit_x_lt_0.shader_test new file mode 100644 index 0000000..da4dd04 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/lit_x_lt_0.shader_test @@ -0,0 +1,16 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM values = {-0.5, 0.0, 0.0, 0.0}; +MOV result.position, vertex.position; +LIT result.color, values; +END + +[test] +ortho -4 4 -4 4 +draw rect -0.25 -0.25 0.5 0.5 +# 1, values.x, 0, 1 +relative probe rgba (0.5, 0.5) (1.0, 0.0, 0.0, 1.0) diff --git a/tests/spec/arb_vertex_program/instructions/log.shader_test b/tests/spec/arb_vertex_program/instructions/log.shader_test new file mode 100644 index 0000000..407138f --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/log.shader_test @@ -0,0 +1,22 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM values = {64.0, 50, 30, 4}; +PARAM scale = {0.1, 0.1, 0.1, 0.1}; +MOV result.position, vertex.position; +TEMP t; +LOG t.x, values.x; +LOG t.y, values.y; +LOG t.z, values.z; +LOG t.w, values.w; +MUL result.color, t, scale; +END + +[test] +ortho -4 4 -4 4 +draw rect -0.25 -0.25 0.5 0.5 +# floor(log2(value.x)), value.y / 2^(floor(log2(value.y))), roughApproxLog2(value.z), 0.1 +relative probe rgba (0.5, 0.5) (0.6, 0.15, 0.49, 0.1) diff --git a/tests/spec/arb_vertex_program/instructions/mad.shader_test b/tests/spec/arb_vertex_program/instructions/mad.shader_test new file mode 100644 index 0000000..b7c9677 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/mad.shader_test @@ -0,0 +1,19 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p1 = program.local[1]; +PARAM p2 = program.local[2]; +MOV result.position, vertex.position; +MAD result.color, vertex.color, p1, p2; +END + +[test] +ortho -4 4 -4 4 +color 0.25 0.75 0.5 0.25 +parameter local_vp 1 (0.5, 0.25, 0.9, 0.5) +parameter local_vp 2 (-1.0, 0.0, 0.25, -0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.0, 0.1875, 0.7, 0.0) diff --git a/tests/spec/arb_vertex_program/instructions/max.shader_test b/tests/spec/arb_vertex_program/instructions/max.shader_test new file mode 100644 index 0000000..0b3b669 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/max.shader_test @@ -0,0 +1,18 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p1 = program.local[1]; +PARAM p2 = program.local[2]; +MOV result.position, vertex.position; +MAX result.color, p1, p2; +END + +[test] +ortho -4 4 -4 4 +parameter local_vp 1 (0.5, 0.25, 0.9, 0.5) +parameter local_vp 2 (-1.0, 0.0, 0.25, -0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.5, 0.25, 0.9, 0.5) diff --git a/tests/spec/arb_vertex_program/instructions/min.shader_test b/tests/spec/arb_vertex_program/instructions/min.shader_test new file mode 100644 index 0000000..42b139e --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/min.shader_test @@ -0,0 +1,17 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p1 = program.local[1]; +MOV result.position, vertex.position; +MIN result.color, p1, vertex.color; +END + +[test] +ortho -4 4 -4 4 +color 0.25 0.75 0.5 0.25 +parameter local_vp 1 (0.5, 0.25, 0.9, 0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.25, 0.25, 0.5, 0.25) diff --git a/tests/spec/arb_vertex_program/instructions/mov_with_swizzle.shader_test b/tests/spec/arb_vertex_program/instructions/mov_with_swizzle.shader_test new file mode 100644 index 0000000..32142d3 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/mov_with_swizzle.shader_test @@ -0,0 +1,15 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +MOV result.position, vertex.position; +MOV result.color, vertex.color.wzxy; +END + +[test] +ortho -4 4 -4 4 +color 0.25 0.75 0.5 0.25 +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.25, 0.5, 0.25, 0.75) diff --git a/tests/spec/arb_vertex_program/instructions/mul_with_swizzle_and_masking.shader_test b/tests/spec/arb_vertex_program/instructions/mul_with_swizzle_and_masking.shader_test new file mode 100644 index 0000000..e4e1e3c --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/mul_with_swizzle_and_masking.shader_test @@ -0,0 +1,18 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p1 = program.local[1]; +MOV result.position, vertex.position; +MUL result.color.xy, p1.wzww, vertex.color.wzww; +MUL result.color.zw, p1.xxyx, vertex.color.xxyx; +END + +[test] +ortho -4 4 -4 4 +color 0.25 0.75 0.5 0.25 +parameter local_vp 1 (0.5, 0.25, 0.9, 0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.125, 0.45, 0.1875, 0.125) diff --git a/tests/spec/arb_vertex_program/instructions/pow_exponentiation.shader_test b/tests/spec/arb_vertex_program/instructions/pow_exponentiation.shader_test new file mode 100644 index 0000000..43083e3 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/pow_exponentiation.shader_test @@ -0,0 +1,18 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM values = {0.5, 2, 3, 4}; +MOV result.position, vertex.position; +POW result.color.x, values.x, values.y; +POW result.color.y, values.x, values.z; +POW result.color.z, values.x, values.w; +POW result.color.w, values.w, values.x; +END + +[test] +ortho -4 4 -4 4 +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.25, 0.125, 0.0625, 1.0) diff --git a/tests/spec/arb_vertex_program/instructions/rcp_reciprocal.shader_test b/tests/spec/arb_vertex_program/instructions/rcp_reciprocal.shader_test new file mode 100644 index 0000000..aeed1a1 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/rcp_reciprocal.shader_test @@ -0,0 +1,18 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM values = {8, -10, 1, 12 }; +MOV result.position, vertex.position; +RCP result.color.x, values.x; +RCP result.color.y, values.y; +RCP result.color.z, values.z; +RCP result.color.w, values.w; +END + +[test] +ortho -4 4 -4 4 +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.125, 0.0, 1, 0.08333333333333333) diff --git a/tests/spec/arb_vertex_program/instructions/rsq_reciprocal_square_root.shader_test b/tests/spec/arb_vertex_program/instructions/rsq_reciprocal_square_root.shader_test new file mode 100644 index 0000000..983e245 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/rsq_reciprocal_square_root.shader_test @@ -0,0 +1,18 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM values = {1, 4, 9, 100 }; +MOV result.position, vertex.position; +RSQ result.color.x, values.x; +RSQ result.color.y, values.y; +RSQ result.color.z, values.z; +RSQ result.color.w, values.w; +END + +[test] +ortho -4 4 -4 4 +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (1.0, 0.5, 0.3333, 0.1) diff --git a/tests/spec/arb_vertex_program/instructions/rsq_reciprocal_square_root_of_negative_value.shader_test b/tests/spec/arb_vertex_program/instructions/rsq_reciprocal_square_root_of_negative_value.shader_test new file mode 100644 index 0000000..e4cc7dd --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/rsq_reciprocal_square_root_of_negative_value.shader_test @@ -0,0 +1,18 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM values = {-100, -5, -1, 0}; +MOV result.position, vertex.position; +RSQ result.color.x, values.x; +RSQ result.color.y, values.y; +RSQ result.color.z, values.z; +RSQ result.color.w, values.w; +END + +[test] +ortho -4 4 -4 4 +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgb (0.5, 0.5) (0.1, 0.447, 1.0) diff --git a/tests/spec/arb_vertex_program/instructions/sge.shader_test b/tests/spec/arb_vertex_program/instructions/sge.shader_test new file mode 100644 index 0000000..401f071 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/sge.shader_test @@ -0,0 +1,18 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p0 = program.local[0]; +PARAM p2 = program.local[2]; +MOV result.position, vertex.position; +SGE result.color, p2, p0; +END + +[test] +ortho -4 4 -4 4 +parameter local_vp 0 (0.0, 0.0, 0.0, 0.0) +parameter local_vp 2 (-1.0, 0.0, 0.25, -0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.0, 1.0, 1.0, 0.0) diff --git a/tests/spec/arb_vertex_program/instructions/slt.shader_test b/tests/spec/arb_vertex_program/instructions/slt.shader_test new file mode 100644 index 0000000..8d098d9 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/slt.shader_test @@ -0,0 +1,18 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p0 = program.local[0]; +PARAM p2 = program.local[2]; +MOV result.position, vertex.position; +SLT result.color, p2, p0; +END + +[test] +ortho -4 4 -4 4 +parameter local_vp 0 (0.0, 0.0, 0.0, 0.0) +parameter local_vp 2 (-1.0, 0.0, 0.25, -0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (1.0, 0.0, 0.0, 1.0) diff --git a/tests/spec/arb_vertex_program/instructions/sub_with_swizzle.shader_test b/tests/spec/arb_vertex_program/instructions/sub_with_swizzle.shader_test new file mode 100644 index 0000000..f42d0f9 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/sub_with_swizzle.shader_test @@ -0,0 +1,17 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p1 = program.local[1]; +MOV result.position, vertex.position; +SUB result.color, p1.yxwz, vertex.color.primary.yxwz; +END + +[test] +ortho -4 4 -4 4 +color 0.25 0.75 0.5 0.25 +parameter local_vp 1 (0.5, 0.25, 0.9, 0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.0, 0.25, 0.25, 0.4) diff --git a/tests/spec/arb_vertex_program/instructions/swz.shader_test b/tests/spec/arb_vertex_program/instructions/swz.shader_test new file mode 100644 index 0000000..3439cae --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/swz.shader_test @@ -0,0 +1,16 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p = program.local[1]; +MOV result.position, vertex.position; +SWZ result.color, p, w,x,x,y; +END + +[test] +ortho -4 4 -4 4 +parameter local_vp 1 (0.5, 0.25, 0.9, 0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.5, 0.5, 0.5, 0.25) diff --git a/tests/spec/arb_vertex_program/instructions/swz_constant.shader_test b/tests/spec/arb_vertex_program/instructions/swz_constant.shader_test new file mode 100644 index 0000000..7e16259 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/swz_constant.shader_test @@ -0,0 +1,16 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p = program.local[1]; +MOV result.position, vertex.position; +SWZ result.color, p, 0,1,0,1; +END + +[test] +ortho -4 4 -4 4 +parameter local_vp 1 (0.5, 0.25, 0.9, 0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.0, 1.0, 0.0, 1.0) diff --git a/tests/spec/arb_vertex_program/instructions/swz_negative.shader_test b/tests/spec/arb_vertex_program/instructions/swz_negative.shader_test new file mode 100644 index 0000000..5a6192e --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/swz_negative.shader_test @@ -0,0 +1,16 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p = program.local[1]; +MOV result.position, vertex.position; +SWZ result.color, p, -w,-x,x,y; +END + +[test] +ortho -4 4 -4 4 +parameter local_vp 1 (0.5, 0.25, 0.9, 0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.0, 0.0, 0.5, 0.25) diff --git a/tests/spec/arb_vertex_program/instructions/swz_src_and_constants.shader_test b/tests/spec/arb_vertex_program/instructions/swz_src_and_constants.shader_test new file mode 100644 index 0000000..6ac11a2 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/swz_src_and_constants.shader_test @@ -0,0 +1,16 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p = program.local[1]; +MOV result.position, vertex.position; +SWZ result.color, p, 1,x,z,0; +END + +[test] +ortho -4 4 -4 4 +parameter local_vp 1 (0.5, 0.25, 0.9, 0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (1.0, 0.5, 0.9, 0.0) diff --git a/tests/spec/arb_vertex_program/instructions/swz_src_negative_and_constants.shader_test b/tests/spec/arb_vertex_program/instructions/swz_src_negative_and_constants.shader_test new file mode 100644 index 0000000..29822e5 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/swz_src_negative_and_constants.shader_test @@ -0,0 +1,16 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p = program.local[1]; +MOV result.position, vertex.position; +SWZ result.color, p, z,-y,-1,0; +END + +[test] +ortho -4 4 -4 4 +parameter local_vp 1 (0.5, 0.25, 0.9, 0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgba (0.5, 0.5) (0.9, 0.0, 0.0, 0.0) diff --git a/tests/spec/arb_vertex_program/instructions/xpd.shader_test b/tests/spec/arb_vertex_program/instructions/xpd.shader_test new file mode 100644 index 0000000..1c120d8 --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/xpd.shader_test @@ -0,0 +1,18 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p1 = program.local[1]; +PARAM p2 = program.local[2]; +MOV result.position, vertex.position; +XPD result.color, p1, p2; +END + +[test] +ortho -4 4 -4 4 +parameter local_vp 1 (0.5, 0.25, 0.9, 0.5) +parameter local_vp 2 (-1.0, 0.0, 0.25, -0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgb (0.5, 0.5) (0.0625, 0.0, 0.25) diff --git a/tests/spec/arb_vertex_program/instructions/xpd_same_src_and_dst_arg.shader_test b/tests/spec/arb_vertex_program/instructions/xpd_same_src_and_dst_arg.shader_test new file mode 100644 index 0000000..76450de --- /dev/null +++ b/tests/spec/arb_vertex_program/instructions/xpd_same_src_and_dst_arg.shader_test @@ -0,0 +1,21 @@ +[require] +GL >= 1.3 +ARB_vertex_program + +[vertex program] +!!ARBvp1.0 +PARAM p1 = program.local[1]; +PARAM p2 = program.local[2]; +TEMP t; +MOV result.position, vertex.position; +MOV t, p1; +XPD t, t, p2; +MOV result.color, t; +END + +[test] +ortho -4 4 -4 4 +parameter local_vp 1 (0.5, 0.25, 0.9, 0.5) +parameter local_vp 2 (-1.0, 0.0, 0.25, -0.5) +draw rect -0.25 -0.25 0.5 0.5 +relative probe rgb (0.5, 0.5) (0.0625, 0.0, 0.25) -- 2.7.4 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit