diff options
author | Eric Anholt <eric@anholt.net> | 2015-01-04 16:37:00 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2015-03-25 12:46:18 -0700 |
commit | 1e8e49a008937b422d4456ef70a95d58fdbc6427 (patch) | |
tree | 4bfe94c51e0d9ffeebfa5b27659bef574c7b7989 | |
parent | b75313b02de0b03c701e6aeb55974842aa407780 (diff) |
variable-index-read/write.sh: Emit requirements for varying floats.
48 of the generated tests were linker-error failing on vc4 due to
trying to use too many varying components.
-rwxr-xr-x | tests/spec/glsl-1.10/variable-index-read.sh | 8 | ||||
-rwxr-xr-x | tests/spec/glsl-1.10/variable-index-write.sh | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/spec/glsl-1.10/variable-index-read.sh b/tests/spec/glsl-1.10/variable-index-read.sh index a64c2e9bd..2fdf9805b 100755 --- a/tests/spec/glsl-1.10/variable-index-read.sh +++ b/tests/spec/glsl-1.10/variable-index-read.sh @@ -376,6 +376,9 @@ function emit_fs_rd_test echo echo "[require]" echo "GLSL >= $version" + if [ "x$mode" = "xvarying" ]; then + echo "GL_MAX_VARYING_COMPONENTS >= $varying_comps" + fi echo emit_vs $* 0 @@ -394,6 +397,9 @@ function emit_vs_rd_test echo echo "[require]" echo "GLSL >= $version" + if [ "x$mode" = "xvarying" ]; then + echo "GL_MAX_VARYING_COMPONENTS >= $varying_comps" + fi echo emit_vs $* 1 @@ -422,6 +428,7 @@ for mode in temp uniform varying; do for array_dim in 0 3; do for matrix_dim in 2 3 4; do if [ $array_dim -ne 0 ]; then + varying_comps=$((4 + matrix_dim * matrix_dim * array_dim)) arr="array-" idx_txt="index-" @@ -465,6 +472,7 @@ for mode in temp uniform varying; do > $name echo $name else + varying_comps=$((4 + matrix_dim * matrix_dim)) arr="" idx_txt="" fi diff --git a/tests/spec/glsl-1.10/variable-index-write.sh b/tests/spec/glsl-1.10/variable-index-write.sh index 678123907..872037442 100755 --- a/tests/spec/glsl-1.10/variable-index-write.sh +++ b/tests/spec/glsl-1.10/variable-index-write.sh @@ -356,6 +356,9 @@ function emit_vs_wr_test echo echo "[require]" echo "GLSL >= ${version}" + if [ "x$mode" = "xvarying" ]; then + echo "GL_MAX_VARYING_COMPONENTS >= $varying_comps" + fi echo echo "[vertex shader]" @@ -419,6 +422,12 @@ for mode in temp varying; do fi for matrix_dim in 2 3 4; do + if [ $array_dim -ne 0 ]; then + varying_comps=$((matrix_dim * matrix_dim * array_dim)) + else + varying_comps=$((matrix_dim * matrix_dim)) + fi + # Fragment shaders cannot write varyings if [ "x$mode" != "xvarying" ]; then name="fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-row-wr.shader_test" |