diff options
author | Andrii Simiklit <andrii.simiklit@globallogic.com> | 2018-10-31 17:05:56 +0200 |
---|---|---|
committer | Tapani Pälli <tapani.palli@intel.com> | 2018-11-29 07:51:50 +0200 |
commit | a96854e3406be69abca77e1e9ce63720e7a3c985 (patch) | |
tree | 726daace977ef52288f1fbe9f955bc08efd896fc /tests/spec | |
parent | 1e05dffc77bf3f31bd2563c3bbb1ca87cd3a2ddc (diff) |
program_interface_query: don't expect a valid location for TCS output
I guess we should not expect a valid location for:
"patch out vec4 tcs_patch;"
because this output variable is declareted
without "layout (location=X)" and according to spec:
"Not all active variables are assigned valid locations; the
following variables will have an effective location of -1:
* uniforms declared as atomic counters;
* members of a uniform block;
* built-in inputs, outputs, and uniforms (starting with "gl_"); and
* inputs or outputs not declared with a "location" layout qualifier,
except for vertex shader inputs and fragment shader outputs."
Also I fixed some conflicting comments.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108612
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Diffstat (limited to 'tests/spec')
-rwxr-xr-x | tests/spec/arb_program_interface_query/getprogramresourceiv.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/spec/arb_program_interface_query/getprogramresourceiv.c b/tests/spec/arb_program_interface_query/getprogramresourceiv.c index 2727a6c87..70212350e 100755 --- a/tests/spec/arb_program_interface_query/getprogramresourceiv.c +++ b/tests/spec/arb_program_interface_query/getprogramresourceiv.c @@ -360,7 +360,7 @@ static const struct subtest_t subtests[] = { { GL_REFERENCED_BY_GEOMETRY_SHADER, 1, { 0 } }, { GL_REFERENCED_BY_FRAGMENT_SHADER, 1, { 0 } }, { GL_REFERENCED_BY_COMPUTE_SHADER, 1, { 0 } }, - { GL_LOCATION, 1, { -1 } }, /* valid index == anything but -1 */ + { GL_LOCATION, 1, { -1 } }, /* invalid index */ { 0, 0, { 0 } }} }, { &prog_loc, GL_PROGRAM_INPUT, "input0", NULL, { @@ -396,12 +396,12 @@ static const struct subtest_t subtests[] = { { GL_NAME_LENGTH, 1, { 6 } }, { GL_TYPE, 1, { GL_FLOAT_VEC4 } }, { GL_ARRAY_SIZE, 1, { 1 } }, - { GL_OFFSET, 1, { -1 } }, /* valid index == anything but -1 */ + { GL_OFFSET, 1, { -1 } }, /* invalid index */ { GL_BLOCK_INDEX, 1, { -1 } }, /* invalid index */ - { GL_ARRAY_STRIDE, 1, { -1 } }, /* valid index == anything but -1 */ + { GL_ARRAY_STRIDE, 1, { -1 } }, /* invalid index */ { GL_MATRIX_STRIDE, 1, { -1 } }, { GL_IS_ROW_MAJOR, 1, { 0 } }, - { GL_ATOMIC_COUNTER_BUFFER_INDEX, 1, { -1 } }, /* valid index == anything but -1 */ + { GL_ATOMIC_COUNTER_BUFFER_INDEX, 1, { -1 } }, /* invalid index */ { GL_REFERENCED_BY_VERTEX_SHADER, 1, { 0 } }, { GL_REFERENCED_BY_TESS_CONTROL_SHADER, 1, { 0 } }, { GL_REFERENCED_BY_TESS_EVALUATION_SHADER, 1, { 0 } }, @@ -421,8 +421,8 @@ static const struct subtest_t subtests[] = { { GL_REFERENCED_BY_GEOMETRY_SHADER, 1, { 0 } }, { GL_REFERENCED_BY_FRAGMENT_SHADER, 1, { 0 } }, { GL_REFERENCED_BY_COMPUTE_SHADER, 1, { 0 } }, - { GL_LOCATION, 1, { 0 } }, /* valid index == anything but -1 */ - { GL_LOCATION_INDEX, 1, { -1 } }, /* valid index == anything but -1 */ + { GL_LOCATION, 1, { -1 } }, /* invalid index */ + { GL_LOCATION_INDEX, 1, { -1 } }, /* invalid index */ { GL_IS_PER_PATCH, 1, { 1 } }, { 0, 0, { 0 } }} }, @@ -435,14 +435,14 @@ static const struct subtest_t subtests[] = { { GL_ARRAY_STRIDE, 1, { 0 } }, /* valid index == anything but -1 */ { GL_MATRIX_STRIDE, 1, { 0 } }, { GL_IS_ROW_MAJOR, 1, { 0 } }, - { GL_ATOMIC_COUNTER_BUFFER_INDEX, 1, { -1 } }, /* valid index == anything but -1 */ + { GL_ATOMIC_COUNTER_BUFFER_INDEX, 1, { -1 } }, /* invalid index */ { GL_REFERENCED_BY_VERTEX_SHADER, 1, { 0 } }, { GL_REFERENCED_BY_TESS_CONTROL_SHADER, 1, { 0 } }, { GL_REFERENCED_BY_TESS_EVALUATION_SHADER, 1, { 0 } }, { GL_REFERENCED_BY_GEOMETRY_SHADER, 1, { 0 } }, { GL_REFERENCED_BY_FRAGMENT_SHADER, 1, { 1 } }, { GL_REFERENCED_BY_COMPUTE_SHADER, 1, { 0 } }, - { GL_LOCATION, 1, { -1 } }, /* valid index == anything but -1 */ + { GL_LOCATION, 1, { -1 } }, /* invalid index */ { 0, 0, { 0 } }} }, { &prog_std, GL_UNIFORM_BLOCK, "fs_uniform_block", fs_std_fs_uniform_blk, { |