VK-GL-CTS icon indicating copy to clipboard operation
VK-GL-CTS copied to clipboard

input can not be qualified with invariant

Open NeoYuAtGF opened this issue 4 years ago • 5 comments

Hi @alegal-arm ,

I met a test compile fail, as the shader mismatch with spec. ogl42 language spec says: Only variables output from a shader (including those that are then input to a subsequent shader) can be candidates for invariance. This includes user-defined output variables and the built-in output variables.

the shader generated in the shader as below. could you help check, thanks a lot. #version 420

in vec4 gs_fs_result; layout (location = 0) out vec4 fs_out_result;

highp in layout (location = 1) smooth invariant vec4 gs_fs_test; highp out layout (location = 1) invariant vec4 fs_out_test;

void main() { vec4 result = vec4(0, 1, 0, 1);

vec4 diff = gs_fs_test - vec4(0, 0, 1, 1);
if (false == all(lessThan(diff, vec4(0.001, 0.001, 0.001, 0.001))))
{
    result = gs_fs_test;
}
else if (vec4(0, 1, 0, 1) != gs_fs_result)
{
     result = vec4(1, 0, 0, 1);
}

fs_out_result = result;
fs_out_test = gs_fs_test;

}

the test item is KHR-GL45.shading_language_420pack.qualifier_order

best regards neo

NeoYuAtGF avatar Dec 24 '21 05:12 NeoYuAtGF

@mnetsch has taken over this repo

debater avatar Dec 24 '21 09:12 debater

This is something we are already investigating internally: https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/3404

pdaniell-nv avatar Jan 04 '22 21:01 pdaniell-nv

Hi @pdaniell-nv ,

sorry to trouble, but how is the conclusion

-neo

NeoYuAtGF avatar Jul 26 '22 06:07 NeoYuAtGF

We concluded that the test has bugs and needs to be fixed, but so far me nor anyone else has had the bandwidth to fix it. It's not a trivial fix. Would you like to try fixing it? You can submit a PR to https://github.com/KhronosGroup/VK-GL-CTS/pulls. Basically doesStageSupportQualifier() needs to be improved to know both sides of the shader interface so it can write the correct qualifiers.

pdaniell-nv avatar Aug 05 '22 23:08 pdaniell-nv

I'd like to, but not familiar the code logic, waiting for your fix

NeoYuAtGF avatar Aug 27 '22 01:08 NeoYuAtGF