From 35e2f65c4061c2f49fca5f6b3c64cb8f003f6168 Mon Sep 17 00:00:00 2001 From: Paavo Pessi Date: Mon, 30 Oct 2017 15:25:49 +0200 Subject: [PATCH] Test component qualifier in shaders Tests were added to verify that various combinations of component qualifiers can be used with different data types (vec2, vec3, vec4, ivec2 and ivec4) in following scenarios: - in vertex shader input - in fragment shader output - when passing data from vertex shader to fragment shader New tests: dEQP-VK.glsl.440.linkage.varying.component.* Components: Vulkan VK-GL-CTS issue: 741 Change-Id: Ie18c420b9d3ba8bd082b98f4618d7fc595b8baba --- android/cts/master/vk-master.txt | 62 + .../vulkancts/data/vulkan/glsl/440/linkage.test | 2607 ++++++++++++++++++++ .../vulkancts/modules/vulkan/vktShaderLibrary.cpp | 93 +- .../vulkancts/modules/vulkan/vktTestPackage.cpp | 19 + external/vulkancts/mustpass/1.0.3/vk-default.txt | 62 + framework/opengl/gluShaderLibrary.cpp | 21 + framework/opengl/gluShaderLibrary.hpp | 12 + 7 files changed, 2866 insertions(+), 10 deletions(-) create mode 100644 external/vulkancts/data/vulkan/glsl/440/linkage.test diff --git a/android/cts/master/vk-master.txt b/android/cts/master/vk-master.txt index 82ec93e..2861a00 100644 --- a/android/cts/master/vk-master.txt +++ b/android/cts/master/vk-master.txt @@ -174107,6 +174107,68 @@ dEQP-VK.glsl.swizzles.vector_swizzles.mediump_bvec4_rgrr_vertex dEQP-VK.glsl.swizzles.vector_swizzles.mediump_bvec4_rgrr_fragment dEQP-VK.glsl.swizzles.vector_swizzles.mediump_bvec4_bbab_vertex dEQP-VK.glsl.swizzles.vector_swizzles.mediump_bvec4_bbab_fragment +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec2.as_float_float +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec2.as_float_float_unused +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec3.as_float_float_float +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec3.as_float_float_float_unused +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec3.as_float_vec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec3.as_float_vec2_unused +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec3.as_vec2_float +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec3.as_vec2_float_unused +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec4.as_float_float_float_float +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec4.as_float_float_vec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec4.as_float_vec2_float +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec4.as_float_vec3 +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec4.as_vec2_float_float +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec4.as_vec2_vec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec4.as_vec3_float +dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec2.as_int_int +dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec2.as_int_int_unused +dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec4.as_int_int_int_int +dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec4.as_int_int_ivec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec4.as_int_ivec2_int +dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec4.as_int_ivec3 +dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec4.as_ivec2_int_int +dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec4.as_ivec2_ivec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec4.as_ivec3_int +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec2.as_float_float +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec3.as_float_float_float +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec3.as_float_vec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec3.as_vec2_float +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec4.as_float_float_float_float +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec4.as_float_float_vec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec4.as_float_vec2_float +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec4.as_float_vec3 +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec4.as_vec2_float_float +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec4.as_vec2_vec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec4.as_vec3_float +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.ivec2.as_int_int +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.ivec4.as_int_int_int_int +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.ivec4.as_int_int_ivec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.ivec4.as_int_ivec2_int +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.ivec4.as_int_ivec3 +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.ivec4.as_ivec2_int_int +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.ivec4.as_ivec2_ivec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.ivec4.as_ivec3_int +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec2.as_float_float +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec3.as_float_float_float +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec3.as_float_vec2 +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec3.as_vec2_float +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec4.as_float_float_float_float +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec4.as_float_float_vec2 +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec4.as_float_vec2_float +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec4.as_float_vec3 +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec4.as_vec2_float_float +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec4.as_vec2_vec2 +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec4.as_vec3_float +dEQP-VK.glsl.440.linkage.varying.component.frag_out.ivec2.as_int_int +dEQP-VK.glsl.440.linkage.varying.component.frag_out.ivec4.as_int_int_int_int +dEQP-VK.glsl.440.linkage.varying.component.frag_out.ivec4.as_int_int_ivec2 +dEQP-VK.glsl.440.linkage.varying.component.frag_out.ivec4.as_int_ivec2_int +dEQP-VK.glsl.440.linkage.varying.component.frag_out.ivec4.as_int_ivec3 +dEQP-VK.glsl.440.linkage.varying.component.frag_out.ivec4.as_ivec2_int_int +dEQP-VK.glsl.440.linkage.varying.component.frag_out.ivec4.as_ivec2_ivec2 +dEQP-VK.glsl.440.linkage.varying.component.frag_out.ivec4.as_ivec3_int dEQP-VK.glsl.derivate.dfdx.constant.float dEQP-VK.glsl.derivate.dfdx.constant.vec2 dEQP-VK.glsl.derivate.dfdx.constant.vec3 diff --git a/external/vulkancts/data/vulkan/glsl/440/linkage.test b/external/vulkancts/data/vulkan/glsl/440/linkage.test new file mode 100644 index 0000000..6c2db3c --- /dev/null +++ b/external/vulkancts/data/vulkan/glsl/440/linkage.test @@ -0,0 +1,2607 @@ + +# Varying tests +group varying "Varying linkage" + group component "Component qualifier" + group vert_in "Vertex shader input" + group vec2 "vec2" + case as_float_float + version 440 core + desc "Read vertex input (vec2) as float float." + output_color vec2 + values + { + input vec2 in0 = [ vec2(1.0, 11.0) | vec2(1.0, 9.0) | vec2(13.0, 7.0) | vec2(8.0, 3.0) ]; + output vec2 out0 = [ vec2(2.0, 22.0) | vec2(2.0, 18.0) | vec2(26.0, 14.0) | vec2(16.0, 6.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in float in0_0; + layout(location = 1, component = 1) in float in0_1; + layout(location = 0) out vec2 var0; + + void main() + { + vec2 in0 = vec2(in0_0, in0_1); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec2 var0; + layout(location = 0) out vec2 dEQP_FragColor; + + void main() + { + vec2 out0 = var0; + out0 /= vec2(255.0); + dEQP_FragColor = out0; + } + "" + end + case as_float_float_unused + version 440 core + desc "Read vertex input (vec2) as float float. Read unused fourth component." + output_color vec2 + values + { + input vec2 in0 = [ vec2(1.0, 11.0) | vec2(1.0, 9.0) | vec2(13.0, 7.0) | vec2(8.0, 3.0) ]; + output vec2 out0 = [ vec2(2.0, 22.0) | vec2(2.0, 18.0) | vec2(26.0, 14.0) | vec2(16.0, 6.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in float in0_0; + layout(location = 1, component = 1) in float in0_1; + layout(location = 1, component = 3) in float in0_3; + layout(location = 0) out vec2 var0; + + void main() + { + vec2 in0 = vec2(in0_0, in0_1); + var0 = in0_3 * in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec2 var0; + layout(location = 0) out vec2 dEQP_FragColor; + + void main() + { + vec2 out0 = var0; + out0 /= vec2(255.0); + dEQP_FragColor = out0; + } + "" + end + end + group vec3 "vec3" + case as_float_float_float + version 440 core + desc "Read vertex input (vec3) as float float float." + output_color vec3 + values + { + input vec3 in0 = [ vec3(6.0, 8.0, 7.0) | vec3(14.0, 10.0, 15.0) | vec3(9.0, 5.0, 4.0) | vec3(7.0, 3.0, 1.0) ]; + output vec3 out0 = [ vec3(12.0, 16.0, 14.0) | vec3(28.0, 20.0, 30.0) | vec3(18.0, 10.0, 8.0) | vec3(14.0, 6.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in float in0_0; + layout(location = 1, component = 1) in float in0_1; + layout(location = 1, component = 2) in float in0_2; + layout(location = 0) out vec3 var0; + + void main() + { + vec3 in0 = vec3(in0_0, in0_1, in0_2); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec3 var0; + layout(location = 0) out vec3 dEQP_FragColor; + + void main() + { + vec3 out0 = var0; + out0 /= vec3(31.0, 63.0, 31.0); + dEQP_FragColor = out0; + } + "" + end + case as_float_float_float_unused + version 440 core + desc "Read vertex input (vec3) as float float float. Read unused fourth component." + output_color vec3 + values + { + input vec3 in0 = [ vec3(6.0, 8.0, 7.0) | vec3(14.0, 10.0, 15.0) | vec3(9.0, 5.0, 4.0) | vec3(7.0, 3.0, 1.0) ]; + output vec3 out0 = [ vec3(12.0, 16.0, 14.0) | vec3(28.0, 20.0, 30.0) | vec3(18.0, 10.0, 8.0) | vec3(14.0, 6.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in float in0_0; + layout(location = 1, component = 1) in float in0_1; + layout(location = 1, component = 2) in float in0_2; + layout(location = 1, component = 3) in float in0_3; + layout(location = 0) out vec3 var0; + + void main() + { + vec3 in0 = vec3(in0_0, in0_1, in0_2); + var0 = in0_3 * in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec3 var0; + layout(location = 0) out vec3 dEQP_FragColor; + + void main() + { + vec3 out0 = var0; + out0 /= vec3(31.0, 63.0, 31.0); + dEQP_FragColor = out0; + } + "" + end + case as_float_vec2 + version 440 core + desc "Read vertex input (vec3) as float vec2." + output_color vec3 + values + { + input vec3 in0 = [ vec3(6.0, 8.0, 7.0) | vec3(14.0, 10.0, 15.0) | vec3(9.0, 5.0, 4.0) | vec3(7.0, 3.0, 1.0) ]; + output vec3 out0 = [ vec3(12.0, 16.0, 14.0) | vec3(28.0, 20.0, 30.0) | vec3(18.0, 10.0, 8.0) | vec3(14.0, 6.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in float in0_0; + layout(location = 1, component = 1) in vec2 in0_1; + layout(location = 0) out vec3 var0; + + void main() + { + vec3 in0 = vec3(in0_0, in0_1); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec3 var0; + layout(location = 0) out vec3 dEQP_FragColor; + + void main() + { + vec3 out0 = var0; + out0 /= vec3(31.0, 63.0, 31.0); + dEQP_FragColor = out0; + } + "" + end + case as_float_vec2_unused + version 440 core + desc "Read vertex input (vec3) as float vec2. Read unused fourth component." + output_color vec3 + values + { + input vec3 in0 = [ vec3(6.0, 8.0, 7.0) | vec3(14.0, 10.0, 15.0) | vec3(9.0, 5.0, 4.0) | vec3(7.0, 3.0, 1.0) ]; + output vec3 out0 = [ vec3(12.0, 16.0, 14.0) | vec3(28.0, 20.0, 30.0) | vec3(18.0, 10.0, 8.0) | vec3(14.0, 6.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in float in0_0; + layout(location = 1, component = 1) in vec2 in0_1; + layout(location = 1, component = 3) in float in0_3; + layout(location = 0) out vec3 var0; + + void main() + { + vec3 in0 = vec3(in0_0, in0_1); + var0 = in0_3 * in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec3 var0; + layout(location = 0) out vec3 dEQP_FragColor; + + void main() + { + vec3 out0 = var0; + out0 /= vec3(31.0, 63.0, 31.0); + dEQP_FragColor = out0; + } + "" + end + case as_vec2_float + version 440 core + desc "Read vertex input (vec3) as vec2 float." + output_color vec3 + values + { + input vec3 in0 = [ vec3(6.0, 8.0, 7.0) | vec3(14.0, 10.0, 15.0) | vec3(9.0, 5.0, 4.0) | vec3(7.0, 3.0, 1.0) ]; + output vec3 out0 = [ vec3(12.0, 16.0, 14.0) | vec3(28.0, 20.0, 30.0) | vec3(18.0, 10.0, 8.0) | vec3(14.0, 6.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in vec2 in0_0; + layout(location = 1, component = 2) in float in0_1; + layout(location = 0) out vec3 var0; + + void main() + { + vec3 in0 = vec3(in0_0, in0_1); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec3 var0; + layout(location = 0) out vec3 dEQP_FragColor; + + void main() + { + vec3 out0 = var0; + out0 /= vec3(31.0, 63.0, 31.0); + dEQP_FragColor = out0; + } + "" + end + case as_vec2_float_unused + version 440 core + desc "Read vertex input (vec3) as vec2 float. Read unused fourth component." + output_color vec3 + values + { + input vec3 in0 = [ vec3(6.0, 8.0, 7.0) | vec3(14.0, 10.0, 15.0) | vec3(9.0, 5.0, 4.0) | vec3(7.0, 3.0, 1.0) ]; + output vec3 out0 = [ vec3(12.0, 16.0, 14.0) | vec3(28.0, 20.0, 30.0) | vec3(18.0, 10.0, 8.0) | vec3(14.0, 6.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in vec2 in0_0; + layout(location = 1, component = 2) in float in0_1; + layout(location = 1, component = 3) in float in0_3; + layout(location = 0) out vec3 var0; + + void main() + { + vec3 in0 = vec3(in0_0, in0_1); + var0 = in0_3 * in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec3 var0; + layout(location = 0) out vec3 dEQP_FragColor; + + void main() + { + vec3 out0 = var0; + out0 /= vec3(31.0, 63.0, 31.0); + dEQP_FragColor = out0; + } + "" + end + end + group vec4 "vec4" + case as_float_float_float_float + version 440 core + desc "Read vertex input (vec4) as float float float float." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in float in0_0; + layout(location = 1, component = 1) in float in0_1; + layout(location = 1, component = 2) in float in0_2; + layout(location = 1, component = 3) in float in0_3; + layout(location = 0) out vec4 var0; + + void main() + { + vec4 in0 = vec4(in0_0, in0_1, in0_2, in0_3); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 var0; + layout(location = 0) out vec4 dEQP_FragColor; + + void main() + { + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor = out0; + } + "" + end + case as_float_float_vec2 + version 440 core + desc "Read vertex input (vec4) as float float vec2." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in float in0_0; + layout(location = 1, component = 1) in float in0_1; + layout(location = 1, component = 2) in vec2 in0_2; + layout(location = 0) out vec4 var0; + + void main() + { + vec4 in0 = vec4(in0_0, in0_1, in0_2); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 var0; + layout(location = 0) out vec4 dEQP_FragColor; + + void main() + { + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor = out0; + } + "" + end + case as_float_vec2_float + version 440 core + desc "Read vertex input (vec4) as float vec2 float." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in float in0_0; + layout(location = 1, component = 1) in vec2 in0_1; + layout(location = 1, component = 3) in float in0_2; + layout(location = 0) out vec4 var0; + + void main() + { + vec4 in0 = vec4(in0_0, in0_1, in0_2); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 var0; + layout(location = 0) out vec4 dEQP_FragColor; + + void main() + { + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor = out0; + } + "" + end + case as_float_vec3 + version 440 core + desc "Read vertex input (vec4) as float vec3." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in float in0_0; + layout(location = 1, component = 1) in vec3 in0_1; + layout(location = 0) out vec4 var0; + + void main() + { + vec4 in0 = vec4(in0_0, in0_1); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 var0; + layout(location = 0) out vec4 dEQP_FragColor; + + void main() + { + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor = out0; + } + "" + end + case as_vec2_float_float + version 440 core + desc "Read vertex input (vec4) as vec2 float float." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in vec2 in0_0; + layout(location = 1, component = 2) in float in0_1; + layout(location = 1, component = 3) in float in0_2; + layout(location = 0) out vec4 var0; + + void main() + { + vec4 in0 = vec4(in0_0, in0_1, in0_2); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 var0; + layout(location = 0) out vec4 dEQP_FragColor; + + void main() + { + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor = out0; + } + "" + end + case as_vec2_vec2 + version 440 core + desc "Read vertex input (vec4) as vec2 vec2." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in vec2 in0_0; + layout(location = 1, component = 2) in vec2 in0_1; + layout(location = 0) out vec4 var0; + + void main() + { + vec4 in0 = vec4(in0_0, in0_1); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 var0; + layout(location = 0) out vec4 dEQP_FragColor; + + void main() + { + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor = out0; + } + "" + end + case as_vec3_float + version 440 core + desc "Read vertex input (vec4) as vec3 float." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in vec3 in0_0; + layout(location = 1, component = 3) in float in0_1; + layout(location = 0) out vec4 var0; + + void main() + { + vec4 in0 = vec4(in0_0, in0_1); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 var0; + layout(location = 0) out vec4 dEQP_FragColor; + + void main() + { + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor = out0; + } + "" + end + end + group ivec2 "ivec2" + case as_int_int + version 440 core + desc "Read vertex input (ivec2) as int int." + output_color ivec2 + values + { + input ivec2 in0 = [ ivec2(7, 13) | ivec2(9, 7) | ivec2(13, 1) | ivec2(15, 11) ]; + output ivec2 out0 = [ ivec2(14, 26) | ivec2(18, 14) | ivec2(26, 2) | ivec2(30, 22) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in int in0_0; + layout(location = 1, component = 1) in int in0_1; + layout(location = 0) out ivec2 var0; + + void main() + { + ivec2 in0 = ivec2(in0_0, in0_1); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) flat in ivec2 var0; + layout(location = 0) out ivec2 dEQP_FragColor; + + void main() + { + ivec2 out0 = var0; + dEQP_FragColor = out0; + } + "" + end + case as_int_int_unused + version 440 core + desc "Read vertex input (ivec2) as int int. Read unused fourth component." + output_color ivec2 + values + { + input ivec2 in0 = [ ivec2(7, 13) | ivec2(9, 7) | ivec2(13, 1) | ivec2(15, 11) ]; + output ivec2 out0 = [ ivec2(14, 26) | ivec2(18, 14) | ivec2(26, 2) | ivec2(30, 22) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in int in0_0; + layout(location = 1, component = 1) in int in0_1; + layout(location = 1, component = 3) in int in0_3; + layout(location = 0) out ivec2 var0; + + void main() + { + ivec2 in0 = ivec2(in0_0, in0_1); + var0 = in0_3 * in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) flat in ivec2 var0; + layout(location = 0) out ivec2 dEQP_FragColor; + + void main() + { + ivec2 out0 = var0; + dEQP_FragColor = out0; + } + "" + end + end + group ivec4 "ivec4" + case as_int_int_int_int + version 440 core + desc "Read vertex input (ivec4) as int int int int." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in int in0_0; + layout(location = 1, component = 1) in int in0_1; + layout(location = 1, component = 2) in int in0_2; + layout(location = 1, component = 3) in int in0_3; + layout(location = 0) out ivec4 var0; + + void main() + { + ivec4 in0 = ivec4(in0_0, in0_1, in0_2, in0_3); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) flat in ivec4 var0; + layout(location = 0) out ivec4 dEQP_FragColor; + + void main() + { + ivec4 out0 = var0; + dEQP_FragColor = out0; + } + "" + end + case as_int_int_ivec2 + version 440 core + desc "Read vertex input (ivec4) as int int ivec2." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in int in0_0; + layout(location = 1, component = 1) in int in0_1; + layout(location = 1, component = 2) in ivec2 in0_2; + layout(location = 0) out ivec4 var0; + + void main() + { + ivec4 in0 = ivec4(in0_0, in0_1, in0_2); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) flat in ivec4 var0; + layout(location = 0) out ivec4 dEQP_FragColor; + + void main() + { + ivec4 out0 = var0; + dEQP_FragColor = out0; + } + "" + end + case as_int_ivec2_int + version 440 core + desc "Read vertex input (ivec4) as int ivec2 int." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in int in0_0; + layout(location = 1, component = 1) in ivec2 in0_1; + layout(location = 1, component = 3) in int in0_2; + layout(location = 0) out ivec4 var0; + + void main() + { + ivec4 in0 = ivec4(in0_0, in0_1, in0_2); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) flat in ivec4 var0; + layout(location = 0) out ivec4 dEQP_FragColor; + + void main() + { + ivec4 out0 = var0; + dEQP_FragColor = out0; + } + "" + end + case as_int_ivec3 + version 440 core + desc "Read vertex input (ivec4) as int ivec3." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in int in0_0; + layout(location = 1, component = 1) in ivec3 in0_1; + layout(location = 0) out ivec4 var0; + + void main() + { + ivec4 in0 = ivec4(in0_0, in0_1); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) flat in ivec4 var0; + layout(location = 0) out ivec4 dEQP_FragColor; + + void main() + { + ivec4 out0 = var0; + dEQP_FragColor = out0; + } + "" + end + case as_ivec2_int_int + version 440 core + desc "Read vertex input (ivec4) as ivec2 int int." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in ivec2 in0_0; + layout(location = 1, component = 2) in int in0_1; + layout(location = 1, component = 3) in int in0_2; + layout(location = 0) out ivec4 var0; + + void main() + { + ivec4 in0 = ivec4(in0_0, in0_1, in0_2); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) flat in ivec4 var0; + layout(location = 0) out ivec4 dEQP_FragColor; + + void main() + { + ivec4 out0 = var0; + dEQP_FragColor = out0; + } + "" + end + case as_ivec2_ivec2 + version 440 core + desc "Read vertex input (ivec4) as ivec2 ivec2." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in ivec2 in0_0; + layout(location = 1, component = 2) in ivec2 in0_1; + layout(location = 0) out ivec4 var0; + + void main() + { + ivec4 in0 = ivec4(in0_0, in0_1); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) flat in ivec4 var0; + layout(location = 0) out ivec4 dEQP_FragColor; + + void main() + { + ivec4 out0 = var0; + dEQP_FragColor = out0; + } + "" + end + case as_ivec3_int + version 440 core + desc "Read vertex input (ivec4) as ivec3 int." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1, component = 0) in ivec3 in0_0; + layout(location = 1, component = 3) in int in0_1; + layout(location = 0) out ivec4 var0; + + void main() + { + ivec4 in0 = ivec4(in0_0, in0_1); + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) flat in ivec4 var0; + layout(location = 0) out ivec4 dEQP_FragColor; + + void main() + { + ivec4 out0 = var0; + dEQP_FragColor = out0; + } + "" + end + end + end + group vert_out_frag_in "Vertex shader output and fragment shader input" + group vec2 "vec2" + case as_float_float + version 440 core + desc "Write vertex output and read fragment input (vec2) as float float." + output_color vec2 + values + { + input vec2 in0 = [ vec2(1.0, 11.0) | vec2(1.0, 9.0) | vec2(13.0, 7.0) | vec2(8.0, 3.0) ]; + output vec2 out0 = [ vec2(2.0, 22.0) | vec2(2.0, 18.0) | vec2(26.0, 14.0) | vec2(16.0, 6.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec2 in0; + layout(location = 0, component = 0) out float var0_0; + layout(location = 0, component = 1) out float var0_1; + + void main() + { + var0_0 = in0.x + in0.x; + var0_1 = in0.y + in0.y; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) in float var0_0; + layout(location = 0, component = 1) in float var0_1; + layout(location = 0) out vec2 dEQP_FragColor; + + void main() + { + vec2 var0 = vec2(var0_0, var0_1); + vec2 out0 = var0; + out0 /= vec2(255.0); + dEQP_FragColor = out0; + } + "" + end + end + group vec3 "vec3" + case as_float_float_float + version 440 core + desc "Write vertex output and read fragment input (vec3) as float float float." + output_color vec3 + values + { + input vec3 in0 = [ vec3(6.0, 8.0, 7.0) | vec3(14.0, 10.0, 15.0) | vec3(9.0, 5.0, 4.0) | vec3(7.0, 3.0, 1.0) ]; + output vec3 out0 = [ vec3(12.0, 16.0, 14.0) | vec3(28.0, 20.0, 30.0) | vec3(18.0, 10.0, 8.0) | vec3(14.0, 6.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec3 in0; + layout(location = 0, component = 0) out float var0_0; + layout(location = 0, component = 1) out float var0_1; + layout(location = 0, component = 2) out float var0_2; + + void main() + { + var0_0 = in0.x + in0.x; + var0_1 = in0.y + in0.y; + var0_2 = in0.z + in0.z; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) in float var0_0; + layout(location = 0, component = 1) in float var0_1; + layout(location = 0, component = 2) in float var0_2; + layout(location = 0) out vec3 dEQP_FragColor; + + void main() + { + vec3 var0 = vec3(var0_0, var0_1, var0_2); + vec3 out0 = var0; + out0 /= vec3(31.0, 63.0, 31.0); + dEQP_FragColor = out0; + } + "" + end + case as_float_vec2 + version 440 core + desc "Write vertex output and read fragment input (vec3) as float vec2." + output_color vec3 + values + { + input vec3 in0 = [ vec3(6.0, 8.0, 7.0) | vec3(14.0, 10.0, 15.0) | vec3(9.0, 5.0, 4.0) | vec3(7.0, 3.0, 1.0) ]; + output vec3 out0 = [ vec3(12.0, 16.0, 14.0) | vec3(28.0, 20.0, 30.0) | vec3(18.0, 10.0, 8.0) | vec3(14.0, 6.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec3 in0; + layout(location = 0, component = 0) out float var0_0; + layout(location = 0, component = 1) out vec2 var0_1; + + void main() + { + var0_0 = in0.x + in0.x; + var0_1 = in0.yz + in0.yz; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) in float var0_0; + layout(location = 0, component = 1) in vec2 var0_1; + layout(location = 0) out vec3 dEQP_FragColor; + + void main() + { + vec3 var0 = vec3(var0_0, var0_1); + vec3 out0 = var0; + out0 /= vec3(31.0, 63.0, 31.0); + dEQP_FragColor = out0; + } + "" + end + case as_vec2_float + version 440 core + desc "Write vertex output and read fragment input (vec3) as vec2 float." + output_color vec3 + values + { + input vec3 in0 = [ vec3(6.0, 8.0, 7.0) | vec3(14.0, 10.0, 15.0) | vec3(9.0, 5.0, 4.0) | vec3(7.0, 3.0, 1.0) ]; + output vec3 out0 = [ vec3(12.0, 16.0, 14.0) | vec3(28.0, 20.0, 30.0) | vec3(18.0, 10.0, 8.0) | vec3(14.0, 6.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec3 in0; + layout(location = 0, component = 0) out vec2 var0_0; + layout(location = 0, component = 2) out float var0_1; + + void main() + { + var0_0 = in0.xy + in0.xy; + var0_1 = in0.z + in0.z; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) in vec2 var0_0; + layout(location = 0, component = 2) in float var0_1; + layout(location = 0) out vec3 dEQP_FragColor; + + void main() + { + vec3 var0 = vec3(var0_0, var0_1); + vec3 out0 = var0; + out0 /= vec3(31.0, 63.0, 31.0); + dEQP_FragColor = out0; + } + "" + end + end + group vec4 "vec4" + case as_float_float_float_float + version 440 core + desc "Write vertex output and read fragment input (vec4) as float float float float." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec4 in0; + layout(location = 0, component = 0) out float var0_0; + layout(location = 0, component = 1) out float var0_1; + layout(location = 0, component = 2) out float var0_2; + layout(location = 0, component = 3) out float var0_3; + + void main() + { + var0_0 = in0.x + in0.x; + var0_1 = in0.y + in0.y; + var0_2 = in0.z + in0.z; + var0_3 = in0.w + in0.w; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) in float var0_0; + layout(location = 0, component = 1) in float var0_1; + layout(location = 0, component = 2) in float var0_2; + layout(location = 0, component = 3) in float var0_3; + layout(location = 0) out vec4 dEQP_FragColor; + + void main() + { + vec4 var0 = vec4(var0_0, var0_1, var0_2, var0_3); + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor = out0; + } + "" + end + case as_float_float_vec2 + version 440 core + desc "Write vertex output and read fragment input (vec4) as float float vec2." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec4 in0; + layout(location = 0, component = 0) out float var0_0; + layout(location = 0, component = 1) out float var0_1; + layout(location = 0, component = 2) out vec2 var0_2; + + void main() + { + var0_0 = in0.x + in0.x; + var0_1 = in0.y + in0.y; + var0_2 = in0.zw + in0.zw; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) in float var0_0; + layout(location = 0, component = 1) in float var0_1; + layout(location = 0, component = 2) in vec2 var0_2; + layout(location = 0) out vec4 dEQP_FragColor; + + void main() + { + vec4 var0 = vec4(var0_0, var0_1, var0_2); + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor = out0; + } + "" + end + case as_float_vec2_float + version 440 core + desc "Write vertex output and read fragment input (vec4) as float vec2 float." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec4 in0; + layout(location = 0, component = 0) out float var0_0; + layout(location = 0, component = 1) out vec2 var0_1; + layout(location = 0, component = 3) out float var0_2; + + void main() + { + var0_0 = in0.x + in0.x; + var0_1 = in0.yz + in0.yz; + var0_2 = in0.w + in0.w; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) in float var0_0; + layout(location = 0, component = 1) in vec2 var0_1; + layout(location = 0, component = 3) in float var0_2; + layout(location = 0) out vec4 dEQP_FragColor; + + void main() + { + vec4 var0 = vec4(var0_0, var0_1, var0_2); + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor = out0; + } + "" + end + case as_float_vec3 + version 440 core + desc "Write vertex output and read fragment input (vec4) as float vec3." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec4 in0; + layout(location = 0, component = 0) out float var0_0; + layout(location = 0, component = 1) out vec3 var0_1; + + void main() + { + var0_0 = in0.x + in0.x; + var0_1 = in0.yzw + in0.yzw; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) in float var0_0; + layout(location = 0, component = 1) in vec3 var0_1; + layout(location = 0) out vec4 dEQP_FragColor; + + void main() + { + vec4 var0 = vec4(var0_0, var0_1); + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor = out0; + } + "" + end + case as_vec2_float_float + version 440 core + desc "Write vertex output and read fragment input (vec4) as vec2 float float." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec4 in0; + layout(location = 0, component = 0) out vec2 var0_0; + layout(location = 0, component = 2) out float var0_1; + layout(location = 0, component = 3) out float var0_2; + + void main() + { + var0_0 = in0.xy + in0.xy; + var0_1 = in0.z + in0.z; + var0_2 = in0.w + in0.w; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) in vec2 var0_0; + layout(location = 0, component = 2) in float var0_1; + layout(location = 0, component = 3) in float var0_2; + layout(location = 0) out vec4 dEQP_FragColor; + + void main() + { + vec4 var0 = vec4(var0_0, var0_1, var0_2); + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor = out0; + } + "" + end + case as_vec2_vec2 + version 440 core + desc "Write vertex output and read fragment input (vec4) as vec2 vec2." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec4 in0; + layout(location = 0, component = 0) out vec2 var0_0; + layout(location = 0, component = 2) out vec2 var0_1; + + void main() + { + var0_0 = in0.xy + in0.xy; + var0_1 = in0.zw + in0.zw; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) in vec2 var0_0; + layout(location = 0, component = 2) in vec2 var0_1; + layout(location = 0) out vec4 dEQP_FragColor; + + void main() + { + vec4 var0 = vec4(var0_0, var0_1); + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor = out0; + } + "" + end + case as_vec3_float + version 440 core + desc "Write vertex output and read fragment input (vec4) as vec3 float." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec4 in0; + layout(location = 0, component = 0) out vec3 var0_0; + layout(location = 0, component = 3) out float var0_1; + + void main() + { + var0_0 = in0.xyz + in0.xyz; + var0_1 = in0.w + in0.w; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) in vec3 var0_0; + layout(location = 0, component = 3) in float var0_1; + layout(location = 0) out vec4 dEQP_FragColor; + + void main() + { + vec4 var0 = vec4(var0_0, var0_1); + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor = out0; + } + "" + end + end + group ivec2 "ivec2" + case as_int_int + version 440 core + desc "Write vertex output and read fragment input (ivec2) as int int." + output_color ivec2 + values + { + input ivec2 in0 = [ ivec2(7, 13) | ivec2(9, 7) | ivec2(13, 1) | ivec2(15, 11) ]; + output ivec2 out0 = [ ivec2(14, 26) | ivec2(18, 14) | ivec2(26, 2) | ivec2(30, 22) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in ivec2 in0; + layout(location = 0, component = 0) out int var0_0; + layout(location = 0, component = 1) out int var0_1; + + void main() + { + var0_0 = in0.x + in0.x; + var0_1 = in0.y + in0.y; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) flat in int var0_0; + layout(location = 0, component = 1) flat in int var0_1; + layout(location = 0) out ivec2 dEQP_FragColor; + + void main() + { + ivec2 var0 = ivec2(var0_0, var0_1); + ivec2 out0 = var0; + dEQP_FragColor = out0; + } + "" + end + end + group ivec4 "ivec4" + case as_int_int_int_int + version 440 core + desc "Write vertex output and read fragment input (ivec4) as int int int int." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in ivec4 in0; + layout(location = 0, component = 0) out int var0_0; + layout(location = 0, component = 1) out int var0_1; + layout(location = 0, component = 2) out int var0_2; + layout(location = 0, component = 3) out int var0_3; + + void main() + { + var0_0 = in0.x + in0.x; + var0_1 = in0.y + in0.y; + var0_2 = in0.z + in0.z; + var0_3 = in0.w + in0.w; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) flat in int var0_0; + layout(location = 0, component = 1) flat in int var0_1; + layout(location = 0, component = 2) flat in int var0_2; + layout(location = 0, component = 3) flat in int var0_3; + layout(location = 0) out ivec4 dEQP_FragColor; + + void main() + { + ivec4 var0 = ivec4(var0_0, var0_1, var0_2, var0_3); + ivec4 out0 = var0; + dEQP_FragColor = out0; + } + "" + end + case as_int_int_ivec2 + version 440 core + desc "Write vertex output and read fragment input (ivec4) as int int ivec2." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in ivec4 in0; + layout(location = 0, component = 0) out int var0_0; + layout(location = 0, component = 1) out int var0_1; + layout(location = 0, component = 2) out ivec2 var0_2; + + void main() + { + var0_0 = in0.x + in0.x; + var0_1 = in0.y + in0.y; + var0_2 = in0.zw + in0.zw; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) flat in int var0_0; + layout(location = 0, component = 1) flat in int var0_1; + layout(location = 0, component = 2) flat in ivec2 var0_2; + layout(location = 0) out ivec4 dEQP_FragColor; + + void main() + { + ivec4 var0 = ivec4(var0_0, var0_1, var0_2); + ivec4 out0 = var0; + dEQP_FragColor = out0; + } + "" + end + case as_int_ivec2_int + version 440 core + desc "Write vertex output and read fragment input (ivec4) as int ivec2 int." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in ivec4 in0; + layout(location = 0, component = 0) out int var0_0; + layout(location = 0, component = 1) out ivec2 var0_1; + layout(location = 0, component = 3) out int var0_2; + + void main() + { + var0_0 = in0.x + in0.x; + var0_1 = in0.yz + in0.yz; + var0_2 = in0.w + in0.w; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) flat in int var0_0; + layout(location = 0, component = 1) flat in ivec2 var0_1; + layout(location = 0, component = 3) flat in int var0_2; + layout(location = 0) out ivec4 dEQP_FragColor; + + void main() + { + ivec4 var0 = ivec4(var0_0, var0_1, var0_2); + ivec4 out0 = var0; + dEQP_FragColor = out0; + } + "" + end + case as_int_ivec3 + version 440 core + desc "Write vertex output and read fragment input (ivec4) as int ivec3." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in ivec4 in0; + layout(location = 0, component = 0) out int var0_0; + layout(location = 0, component = 1) out ivec3 var0_1; + + void main() + { + var0_0 = in0.x + in0.x; + var0_1 = in0.yzw + in0.yzw; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) flat in int var0_0; + layout(location = 0, component = 1) flat in ivec3 var0_1; + layout(location = 0) out ivec4 dEQP_FragColor; + + void main() + { + ivec4 var0 = ivec4(var0_0, var0_1); + ivec4 out0 = var0; + dEQP_FragColor = out0; + } + "" + end + case as_ivec2_int_int + version 440 core + desc "Write vertex output and read fragment input (ivec4) as ivec2 int int." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in ivec4 in0; + layout(location = 0, component = 0) out ivec2 var0_0; + layout(location = 0, component = 2) out int var0_1; + layout(location = 0, component = 3) out int var0_2; + + void main() + { + var0_0 = in0.xy + in0.xy; + var0_1 = in0.z + in0.z; + var0_2 = in0.w + in0.w; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) flat in ivec2 var0_0; + layout(location = 0, component = 2) flat in int var0_1; + layout(location = 0, component = 3) flat in int var0_2; + layout(location = 0) out ivec4 dEQP_FragColor; + + void main() + { + ivec4 var0 = ivec4(var0_0, var0_1, var0_2); + ivec4 out0 = var0; + dEQP_FragColor = out0; + } + "" + end + case as_ivec2_ivec2 + version 440 core + desc "Write vertex output and read fragment input (ivec4) as ivec2 ivec2." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in ivec4 in0; + layout(location = 0, component = 0) out ivec2 var0_0; + layout(location = 0, component = 2) out ivec2 var0_1; + + void main() + { + var0_0 = in0.xy + in0.xy; + var0_1 = in0.zw + in0.zw; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) flat in ivec2 var0_0; + layout(location = 0, component = 2) flat in ivec2 var0_1; + layout(location = 0) out ivec4 dEQP_FragColor; + + void main() + { + ivec4 var0 = ivec4(var0_0, var0_1); + ivec4 out0 = var0; + dEQP_FragColor = out0; + } + "" + end + case as_ivec3_int + version 440 core + desc "Write vertex output and read fragment input (ivec4) as ivec3 int." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in ivec4 in0; + layout(location = 0, component = 0) out ivec3 var0_0; + layout(location = 0, component = 3) out int var0_1; + + void main() + { + var0_0 = in0.xyz + in0.xyz; + var0_1 = in0.w + in0.w; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0, component = 0) flat in ivec3 var0_0; + layout(location = 0, component = 3) flat in int var0_1; + layout(location = 0) out ivec4 dEQP_FragColor; + + void main() + { + ivec4 var0 = ivec4(var0_0, var0_1); + ivec4 out0 = var0; + dEQP_FragColor = out0; + } + "" + end + end + end + group frag_out "Fragment shader output" + group vec2 "vec2" + case as_float_float + version 440 core + desc "Write fragment output (vec2) as float float." + output_color vec2 + values + { + input vec2 in0 = [ vec2(1.0, 11.0) | vec2(1.0, 9.0) | vec2(13.0, 7.0) | vec2(8.0, 3.0) ]; + output vec2 out0 = [ vec2(2.0, 22.0) | vec2(2.0, 18.0) | vec2(26.0, 14.0) | vec2(16.0, 6.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec2 in0; + layout(location = 0) out vec2 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec2 var0; + layout(location = 0, component = 0) out float dEQP_FragColor_0; + layout(location = 0, component = 1) out float dEQP_FragColor_1; + + void main() + { + vec2 out0 = var0; + out0 /= vec2(255.0); + dEQP_FragColor_0 = out0.x; + dEQP_FragColor_1 = out0.y; + } + "" + end + end + group vec3 "vec3" + case as_float_float_float + version 440 core + desc "Write fragment output (vec3) as float float float." + output_color vec3 + values + { + input vec3 in0 = [ vec3(6.0, 8.0, 7.0) | vec3(14.0, 10.0, 15.0) | vec3(9.0, 5.0, 4.0) | vec3(7.0, 3.0, 1.0) ]; + output vec3 out0 = [ vec3(12.0, 16.0, 14.0) | vec3(28.0, 20.0, 30.0) | vec3(18.0, 10.0, 8.0) | vec3(14.0, 6.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec3 in0; + layout(location = 0) out vec3 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec3 var0; + layout(location = 0, component = 0) out float dEQP_FragColor_0; + layout(location = 0, component = 1) out float dEQP_FragColor_1; + layout(location = 0, component = 2) out float dEQP_FragColor_2; + + void main() + { + vec3 out0 = var0; + out0 /= vec3(31.0, 63.0, 31.0); + dEQP_FragColor_0 = out0.x; + dEQP_FragColor_1 = out0.y; + dEQP_FragColor_2 = out0.z; + } + "" + end + case as_float_vec2 + version 440 core + desc "Write fragment output (vec3) as float vec2." + output_color vec3 + values + { + input vec3 in0 = [ vec3(6.0, 8.0, 7.0) | vec3(14.0, 10.0, 15.0) | vec3(9.0, 5.0, 4.0) | vec3(7.0, 3.0, 1.0) ]; + output vec3 out0 = [ vec3(12.0, 16.0, 14.0) | vec3(28.0, 20.0, 30.0) | vec3(18.0, 10.0, 8.0) | vec3(14.0, 6.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec3 in0; + layout(location = 0) out vec3 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec3 var0; + layout(location = 0, component = 0) out float dEQP_FragColor_0; + layout(location = 0, component = 1) out vec2 dEQP_FragColor_1; + + void main() + { + vec3 out0 = var0; + out0 /= vec3(31.0, 63.0, 31.0); + dEQP_FragColor_0 = out0.x; + dEQP_FragColor_1 = out0.yz; + } + "" + end + case as_vec2_float + version 440 core + desc "Write fragment output (vec3) as vec2 float." + output_color vec3 + values + { + input vec3 in0 = [ vec3(6.0, 8.0, 7.0) | vec3(14.0, 10.0, 15.0) | vec3(9.0, 5.0, 4.0) | vec3(7.0, 3.0, 1.0) ]; + output vec3 out0 = [ vec3(12.0, 16.0, 14.0) | vec3(28.0, 20.0, 30.0) | vec3(18.0, 10.0, 8.0) | vec3(14.0, 6.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec3 in0; + layout(location = 0) out vec3 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec3 var0; + layout(location = 0, component = 0) out vec2 dEQP_FragColor_0; + layout(location = 0, component = 2) out float dEQP_FragColor_1; + + void main() + { + vec3 out0 = var0; + out0 /= vec3(31.0, 63.0, 31.0); + dEQP_FragColor_0 = out0.xy; + dEQP_FragColor_1 = out0.z; + } + "" + end + end + group vec4 "vec4" + case as_float_float_float_float + version 440 core + desc "Write fragment output (vec4) as float float float float." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec4 in0; + layout(location = 0) out vec4 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 var0; + layout(location = 0, component = 0) out float dEQP_FragColor_0; + layout(location = 0, component = 1) out float dEQP_FragColor_1; + layout(location = 0, component = 2) out float dEQP_FragColor_2; + layout(location = 0, component = 3) out float dEQP_FragColor_3; + + void main() + { + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor_0 = out0.x; + dEQP_FragColor_1 = out0.y; + dEQP_FragColor_2 = out0.z; + dEQP_FragColor_3 = out0.w; + } + "" + end + case as_float_float_vec2 + version 440 core + desc "Write fragment output (vec4) as float float vec2." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec4 in0; + layout(location = 0) out vec4 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 var0; + layout(location = 0, component = 0) out float dEQP_FragColor_0; + layout(location = 0, component = 1) out float dEQP_FragColor_1; + layout(location = 0, component = 2) out vec2 dEQP_FragColor_2; + + void main() + { + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor_0 = out0.x; + dEQP_FragColor_1 = out0.y; + dEQP_FragColor_2 = out0.zw; + } + "" + end + case as_float_vec2_float + version 440 core + desc "Write fragment output (vec4) as float vec2 float." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec4 in0; + layout(location = 0) out vec4 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 var0; + layout(location = 0, component = 0) out float dEQP_FragColor_0; + layout(location = 0, component = 1) out vec2 dEQP_FragColor_1; + layout(location = 0, component = 3) out float dEQP_FragColor_2; + + void main() + { + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor_0 = out0.x; + dEQP_FragColor_1 = out0.yz; + dEQP_FragColor_2 = out0.w; + } + "" + end + case as_float_vec3 + version 440 core + desc "Write fragment output (vec4) as float vec3." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec4 in0; + layout(location = 0) out vec4 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 var0; + layout(location = 0, component = 0) out float dEQP_FragColor_0; + layout(location = 0, component = 1) out vec3 dEQP_FragColor_1; + + void main() + { + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor_0 = out0.x; + dEQP_FragColor_1 = out0.yzw; + } + "" + end + case as_vec2_float_float + version 440 core + desc "Write fragment output (vec4) as vec2 float float." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec4 in0; + layout(location = 0) out vec4 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 var0; + layout(location = 0, component = 0) out vec2 dEQP_FragColor_0; + layout(location = 0, component = 2) out float dEQP_FragColor_1; + layout(location = 0, component = 3) out float dEQP_FragColor_2; + + void main() + { + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor_0 = out0.xy; + dEQP_FragColor_1 = out0.z; + dEQP_FragColor_2 = out0.w; + } + "" + end + case as_vec2_vec2 + version 440 core + desc "Write fragment output (vec4) as vec2 vec2." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec4 in0; + layout(location = 0) out vec4 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 var0; + layout(location = 0, component = 0) out vec2 dEQP_FragColor_0; + layout(location = 0, component = 2) out vec2 dEQP_FragColor_1; + + void main() + { + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor_0 = out0.xy; + dEQP_FragColor_1 = out0.zw; + } + "" + end + case as_vec3_float + version 440 core + desc "Write fragment output (vec4) as vec3 float." + output_color vec4 + values + { + input vec4 in0 = [ vec4(13.0, 2.0, 11.0, 1.0) | vec4(4.0, 13.0, 8.0, 3.0) | vec4(7.0, 5.0, 1.0, 12.0) | vec4(14.0, 15.0, 11.0, 1.0) ]; + output vec4 out0 = [ vec4(26.0, 4.0, 22.0, 2.0) | vec4(8.0, 26.0, 16.0, 6.0) | vec4(14.0, 10.0, 2.0, 24.0) | vec4(28.0, 30.0, 22.0, 2.0) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in vec4 in0; + layout(location = 0) out vec4 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 var0; + layout(location = 0, component = 0) out vec3 dEQP_FragColor_0; + layout(location = 0, component = 3) out float dEQP_FragColor_1; + + void main() + { + vec4 out0 = var0; + out0 /= vec4(255.0); + dEQP_FragColor_0 = out0.xyz; + dEQP_FragColor_1 = out0.w; + } + "" + end + end + group ivec2 "ivec2" + case as_int_int + version 440 core + desc "Write fragment output (ivec2) as int int." + output_color ivec2 + values + { + input ivec2 in0 = [ ivec2(7, 13) | ivec2(9, 7) | ivec2(13, 1) | ivec2(15, 11) ]; + output ivec2 out0 = [ ivec2(14, 26) | ivec2(18, 14) | ivec2(26, 2) | ivec2(30, 22) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in ivec2 in0; + layout(location = 0) out ivec2 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) flat in ivec2 var0; + layout(location = 0, component = 0) out int dEQP_FragColor_0; + layout(location = 0, component = 1) out int dEQP_FragColor_1; + + void main() + { + ivec2 out0 = var0; + dEQP_FragColor_0 = out0.x; + dEQP_FragColor_1 = out0.y; + } + "" + end + end + group ivec4 "ivec4" + case as_int_int_int_int + version 440 core + desc "Write fragment output (ivec4) as int int int int." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in ivec4 in0; + layout(location = 0) out ivec4 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) flat in ivec4 var0; + layout(location = 0, component = 0) out int dEQP_FragColor_0; + layout(location = 0, component = 1) out int dEQP_FragColor_1; + layout(location = 0, component = 2) out int dEQP_FragColor_2; + layout(location = 0, component = 3) out int dEQP_FragColor_3; + + void main() + { + ivec4 out0 = var0; + dEQP_FragColor_0 = out0.x; + dEQP_FragColor_1 = out0.y; + dEQP_FragColor_2 = out0.z; + dEQP_FragColor_3 = out0.w; + } + "" + end + case as_int_int_ivec2 + version 440 core + desc "Write fragment output (ivec4) as int int ivec2." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in ivec4 in0; + layout(location = 0) out ivec4 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) flat in ivec4 var0; + layout(location = 0, component = 0) out int dEQP_FragColor_0; + layout(location = 0, component = 1) out int dEQP_FragColor_1; + layout(location = 0, component = 2) out ivec2 dEQP_FragColor_2; + + void main() + { + ivec4 out0 = var0; + dEQP_FragColor_0 = out0.x; + dEQP_FragColor_1 = out0.y; + dEQP_FragColor_2 = out0.zw; + } + "" + end + case as_int_ivec2_int + version 440 core + desc "Write fragment output (ivec4) as int ivec2 int." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in ivec4 in0; + layout(location = 0) out ivec4 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) flat in ivec4 var0; + layout(location = 0, component = 0) out int dEQP_FragColor_0; + layout(location = 0, component = 1) out ivec2 dEQP_FragColor_1; + layout(location = 0, component = 3) out int dEQP_FragColor_2; + + void main() + { + ivec4 out0 = var0; + dEQP_FragColor_0 = out0.x; + dEQP_FragColor_1 = out0.yz; + dEQP_FragColor_2 = out0.w; + } + "" + end + case as_int_ivec3 + version 440 core + desc "Write fragment output (ivec4) as int ivec3." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in ivec4 in0; + layout(location = 0) out ivec4 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) flat in ivec4 var0; + layout(location = 0, component = 0) out int dEQP_FragColor_0; + layout(location = 0, component = 1) out ivec3 dEQP_FragColor_1; + + void main() + { + ivec4 out0 = var0; + dEQP_FragColor_0 = out0.x; + dEQP_FragColor_1 = out0.yzw; + } + "" + end + case as_ivec2_int_int + version 440 core + desc "Write fragment output (ivec4) as ivec2 int int." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in ivec4 in0; + layout(location = 0) out ivec4 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) flat in ivec4 var0; + layout(location = 0, component = 0) out ivec2 dEQP_FragColor_0; + layout(location = 0, component = 2) out int dEQP_FragColor_1; + layout(location = 0, component = 3) out int dEQP_FragColor_2; + + void main() + { + ivec4 out0 = var0; + dEQP_FragColor_0 = out0.xy; + dEQP_FragColor_1 = out0.z; + dEQP_FragColor_2 = out0.w; + } + "" + end + case as_ivec2_ivec2 + version 440 core + desc "Write fragment output (ivec4) as ivec2 ivec2." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in ivec4 in0; + layout(location = 0) out ivec4 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) flat in ivec4 var0; + layout(location = 0, component = 0) out ivec2 dEQP_FragColor_0; + layout(location = 0, component = 2) out ivec2 dEQP_FragColor_1; + + void main() + { + ivec4 out0 = var0; + dEQP_FragColor_0 = out0.xy; + dEQP_FragColor_1 = out0.zw; + } + "" + end + case as_ivec3_int + version 440 core + desc "Write fragment output (ivec4) as ivec3 int." + output_color ivec4 + values + { + input ivec4 in0 = [ ivec4(2, 4, 13, 12) | ivec4(7, 3, 2, 11) | ivec4(6, 2, 9, 5) | ivec4(10, 15, 1, 9) ]; + output ivec4 out0 = [ ivec4(4, 8, 26, 24) | ivec4(14, 6, 4, 22) | ivec4(12, 4, 18, 10) | ivec4(20, 30, 2, 18) ]; + } + vertex "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) in vec4 dEQP_Position; + layout(location = 1) in ivec4 in0; + layout(location = 0) out ivec4 var0; + + void main() + { + var0 = in0 + in0; + ${VERTEX_OUTPUT} + } + "" + fragment "" + #version 440 core + precision highp float; + precision highp int; + layout(location = 0) flat in ivec4 var0; + layout(location = 0, component = 0) out ivec3 dEQP_FragColor_0; + layout(location = 0, component = 3) out int dEQP_FragColor_1; + + void main() + { + ivec4 out0 = var0; + dEQP_FragColor_0 = out0.xyz; + dEQP_FragColor_1 = out0.w; + } + "" + end + end + end + end +end diff --git a/external/vulkancts/modules/vulkan/vktShaderLibrary.cpp b/external/vulkancts/modules/vulkan/vktShaderLibrary.cpp index 15d4830..c506ff7 100644 --- a/external/vulkancts/modules/vulkan/vktShaderLibrary.cpp +++ b/external/vulkancts/modules/vulkan/vktShaderLibrary.cpp @@ -31,6 +31,7 @@ #include "vkQueryUtil.hpp" #include "vkBuilderUtil.hpp" #include "vkTypeUtil.hpp" +#include "vkImageUtil.hpp" #include "gluShaderLibrary.hpp" #include "gluShaderUtil.hpp" @@ -1281,6 +1282,25 @@ MovePtr allocateAndBindMemory (Context& context, vk::VkBuffer bu return memory; } +vk::VkFormat getRenderTargetFormat (DataType dataType) +{ + switch (dataType) + { + case glu::TYPE_FLOAT_VEC2: + return vk::VK_FORMAT_R8G8_UNORM; + case glu::TYPE_FLOAT_VEC3: + return vk::VK_FORMAT_R5G6B5_UNORM_PACK16; + case glu::TYPE_FLOAT_VEC4: + return vk::VK_FORMAT_R8G8B8A8_UNORM; + case glu::TYPE_INT_VEC2: + return vk::VK_FORMAT_R8G8_SINT; + case glu::TYPE_INT_VEC4: + return vk::VK_FORMAT_R8G8B8A8_SINT; + default: + return vk::VK_FORMAT_R8G8B8A8_UNORM; + } +} + MovePtr allocateAndBindMemory (Context& context, vk::VkImage image, vk::MemoryRequirement memReqs) { const vk::DeviceInterface& vkd = context.getDeviceInterface(); @@ -1340,13 +1360,14 @@ private: const Unique m_uniformBuffer; // Uniform values. Can be NULL if no uniforms present const UniquePtr m_uniformMem; // Uniform memory, can be NULL if no uniform buffer exists - const Unique m_readImageBuffer; - const UniquePtr m_readImageMem; - + const vk::VkFormat m_rtFormat; const Unique m_rtImage; const UniquePtr m_rtMem; const Unique m_rtView; + const Unique m_readImageBuffer; + const UniquePtr m_readImageMem; + const Unique m_renderPass; const Unique m_framebuffer; const PipelineProgram m_program; @@ -1382,14 +1403,15 @@ ShaderCaseInstance::ShaderCaseInstance (Context& context, const ShaderCaseSpecif , m_uniformBuffer (m_uniformLayout.size > 0 ? createBuffer(context, (vk::VkDeviceSize)m_uniformLayout.size, vk::VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT) : Move()) , m_uniformMem (m_uniformLayout.size > 0 ? allocateAndBindMemory(context, *m_uniformBuffer, vk::MemoryRequirement::HostVisible) : MovePtr()) - , m_readImageBuffer (createBuffer(context, (vk::VkDeviceSize)(RENDER_WIDTH*RENDER_HEIGHT*4), vk::VK_BUFFER_USAGE_TRANSFER_DST_BIT)) - , m_readImageMem (allocateAndBindMemory(context, *m_readImageBuffer, vk::MemoryRequirement::HostVisible)) - - , m_rtImage (createImage2D(context, RENDER_WIDTH, RENDER_HEIGHT, vk::VK_FORMAT_R8G8B8A8_UNORM, vk::VK_IMAGE_TILING_OPTIMAL, vk::VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT|vk::VK_IMAGE_USAGE_TRANSFER_SRC_BIT)) + , m_rtFormat (getRenderTargetFormat(spec.outputFormat)) + , m_rtImage (createImage2D(context, RENDER_WIDTH, RENDER_HEIGHT, m_rtFormat, vk::VK_IMAGE_TILING_OPTIMAL, vk::VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT|vk::VK_IMAGE_USAGE_TRANSFER_SRC_BIT)) , m_rtMem (allocateAndBindMemory(context, *m_rtImage, vk::MemoryRequirement::Any)) - , m_rtView (createAttachmentView(context, *m_rtImage, vk::VK_FORMAT_R8G8B8A8_UNORM)) + , m_rtView (createAttachmentView(context, *m_rtImage, m_rtFormat)) + + , m_readImageBuffer (createBuffer(context, (vk::VkDeviceSize)(RENDER_WIDTH * RENDER_HEIGHT * tcu::getPixelSize(vk::mapVkFormat(m_rtFormat))), vk::VK_BUFFER_USAGE_TRANSFER_DST_BIT)) + , m_readImageMem (allocateAndBindMemory(context, *m_readImageBuffer, vk::MemoryRequirement::HostVisible)) - , m_renderPass (createRenderPass(context, vk::VK_FORMAT_R8G8B8A8_UNORM)) + , m_renderPass (createRenderPass(context, m_rtFormat)) , m_framebuffer (createFramebuffer(context, *m_renderPass, *m_rtView, RENDER_WIDTH, RENDER_HEIGHT)) , m_program (context, spec) , m_descriptorSetLayout (createDescriptorSetLayout(context, m_program.getStages())) @@ -1587,6 +1609,7 @@ ShaderCaseInstance::ShaderCaseInstance (Context& context, const ShaderCaseSpecif } { + const vk::VkDeviceSize size = (vk::VkDeviceSize)(RENDER_WIDTH * RENDER_HEIGHT * tcu::getPixelSize(vk::mapVkFormat(m_rtFormat))); const vk::VkBufferMemoryBarrier copyFinishBarrier = { vk::VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, // sType @@ -1597,7 +1620,7 @@ ShaderCaseInstance::ShaderCaseInstance (Context& context, const ShaderCaseSpecif queueFamilyIndex, // destQueueFamilyIndex *m_readImageBuffer, // buffer 0u, // offset - (vk::VkDeviceSize)(RENDER_WIDTH*RENDER_HEIGHT*4) // size + size // size }; vkd.cmdPipelineBarrier(*m_cmdBuffer, vk::VK_PIPELINE_STAGE_TRANSFER_BIT, vk::VK_PIPELINE_STAGE_HOST_BIT, (vk::VkDependencyFlags)0, @@ -1639,6 +1662,21 @@ bool checkResultImage (const ConstPixelBufferAccess& result) return true; } +bool checkResultImageWithReference (const ConstPixelBufferAccess& result, tcu::IVec4 refPix) +{ + for (int y = 0; y < result.getHeight(); y++) + { + for (int x = 0; x < result.getWidth(); x++) + { + const tcu::IVec4 resPix = result.getPixelInt(x, y); + + if (boolAny(notEqual(resPix, refPix))) + return false; + } + } + + return true; +} TestStatus ShaderCaseInstance::iterate (void) { const vk::DeviceInterface& vkd = m_context.getDeviceInterface(); @@ -1673,6 +1711,8 @@ TestStatus ShaderCaseInstance::iterate (void) VK_CHECK(vkd.waitForFences (device, 1u, &fence.get(), DE_TRUE, ~0ull)); } + // Result was checked in fragment shader + if (m_spec.outputType == glu::sl::OUTPUT_RESULT) { const ConstPixelBufferAccess imgAccess (TextureFormat(TextureFormat::RGBA, TextureFormat::UNORM_INT8), RENDER_WIDTH, RENDER_HEIGHT, 1, m_readImageMem->getHostPtr()); @@ -1690,6 +1730,39 @@ TestStatus ShaderCaseInstance::iterate (void) return TestStatus::fail(string("Got invalid pixels at sub-case ") + de::toString(m_subCaseNdx)); } } + // Result was written to color buffer + else + { + const ConstPixelBufferAccess imgAccess (vk::mapVkFormat(m_rtFormat), RENDER_WIDTH, RENDER_HEIGHT, 1, m_readImageMem->getHostPtr()); + const DataType dataType = m_spec.values.outputs[0].type.getBasicType(); + const int numComponents = getDataTypeScalarSize(dataType); + tcu::IVec4 reference (0, 0, 0, 1); + + for (int refNdx = 0; refNdx < numComponents; refNdx++) + { + if (isDataTypeFloatOrVec(dataType)) + reference[refNdx] = (int)m_spec.values.outputs[0].elements[m_subCaseNdx * numComponents + refNdx].float32; + else if (isDataTypeIntOrIVec(dataType)) + reference[refNdx] = m_spec.values.outputs[0].elements[m_subCaseNdx * numComponents + refNdx].int32; + else + DE_FATAL("Unknown data type"); + } + + invalidateMappedMemoryRange(vkd, device, m_readImageMem->getMemory(), m_readImageMem->getOffset(), (vk::VkDeviceSize)(RENDER_WIDTH * RENDER_HEIGHT * tcu::getPixelSize(vk::mapVkFormat(m_rtFormat)))); + + if (!checkResultImageWithReference(imgAccess, reference)) + { + TestLog& log = m_context.getTestContext().getLog(); + + log << TestLog::Message << "ERROR: Got nonmatching pixels on sub-case " << m_subCaseNdx << TestLog::EndMessage + << TestLog::Image("Result", "Result", imgAccess); + + dumpValues(log, m_spec.values, m_subCaseNdx); + + return TestStatus::fail(string("Got invalid pixels at sub-case ") + de::toString(m_subCaseNdx)); + } + } + if (++m_subCaseNdx < getNumSubCases(m_spec.values)) return TestStatus::incomplete(); diff --git a/external/vulkancts/modules/vulkan/vktTestPackage.cpp b/external/vulkancts/modules/vulkan/vktTestPackage.cpp index f62c4fd..a45302e 100644 --- a/external/vulkancts/modules/vulkan/vktTestPackage.cpp +++ b/external/vulkancts/modules/vulkan/vktTestPackage.cpp @@ -363,6 +363,25 @@ void createGlslTests (tcu::TestCaseGroup* glslTests) s_es310Tests[ndx].description, std::string("vulkan/glsl/es310/") + s_es310Tests[ndx].name + ".test").release()); + static const struct + { + const char* name; + const char* description; + } s_440Tests[] = + { + { "linkage", "Linking" }, + }; + + de::MovePtr glsl440Tests = de::MovePtr(new tcu::TestCaseGroup(testCtx, "440", "")); + + for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(s_440Tests); ndx++) + glsl440Tests->addChild(createShaderLibraryGroup(testCtx, + s_440Tests[ndx].name, + s_440Tests[ndx].description, + std::string("vulkan/glsl/440/") + s_440Tests[ndx].name + ".test").release()); + + glslTests->addChild(glsl440Tests.release()); + // ShaderRenderCase-based tests glslTests->addChild(sr::createDerivateTests (testCtx)); glslTests->addChild(sr::createDiscardTests (testCtx)); diff --git a/external/vulkancts/mustpass/1.0.3/vk-default.txt b/external/vulkancts/mustpass/1.0.3/vk-default.txt index 20f3cd2..15da20c 100644 --- a/external/vulkancts/mustpass/1.0.3/vk-default.txt +++ b/external/vulkancts/mustpass/1.0.3/vk-default.txt @@ -174088,6 +174088,68 @@ dEQP-VK.glsl.swizzles.vector_swizzles.mediump_bvec4_rgrr_vertex dEQP-VK.glsl.swizzles.vector_swizzles.mediump_bvec4_rgrr_fragment dEQP-VK.glsl.swizzles.vector_swizzles.mediump_bvec4_bbab_vertex dEQP-VK.glsl.swizzles.vector_swizzles.mediump_bvec4_bbab_fragment +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec2.as_float_float +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec2.as_float_float_unused +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec3.as_float_float_float +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec3.as_float_float_float_unused +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec3.as_float_vec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec3.as_float_vec2_unused +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec3.as_vec2_float +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec3.as_vec2_float_unused +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec4.as_float_float_float_float +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec4.as_float_float_vec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec4.as_float_vec2_float +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec4.as_float_vec3 +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec4.as_vec2_float_float +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec4.as_vec2_vec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec4.as_vec3_float +dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec2.as_int_int +dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec2.as_int_int_unused +dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec4.as_int_int_int_int +dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec4.as_int_int_ivec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec4.as_int_ivec2_int +dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec4.as_int_ivec3 +dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec4.as_ivec2_int_int +dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec4.as_ivec2_ivec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_in.ivec4.as_ivec3_int +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec2.as_float_float +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec3.as_float_float_float +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec3.as_float_vec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec3.as_vec2_float +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec4.as_float_float_float_float +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec4.as_float_float_vec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec4.as_float_vec2_float +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec4.as_float_vec3 +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec4.as_vec2_float_float +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec4.as_vec2_vec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.vec4.as_vec3_float +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.ivec2.as_int_int +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.ivec4.as_int_int_int_int +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.ivec4.as_int_int_ivec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.ivec4.as_int_ivec2_int +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.ivec4.as_int_ivec3 +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.ivec4.as_ivec2_int_int +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.ivec4.as_ivec2_ivec2 +dEQP-VK.glsl.440.linkage.varying.component.vert_out_frag_in.ivec4.as_ivec3_int +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec2.as_float_float +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec3.as_float_float_float +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec3.as_float_vec2 +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec3.as_vec2_float +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec4.as_float_float_float_float +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec4.as_float_float_vec2 +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec4.as_float_vec2_float +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec4.as_float_vec3 +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec4.as_vec2_float_float +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec4.as_vec2_vec2 +dEQP-VK.glsl.440.linkage.varying.component.frag_out.vec4.as_vec3_float +dEQP-VK.glsl.440.linkage.varying.component.frag_out.ivec2.as_int_int +dEQP-VK.glsl.440.linkage.varying.component.frag_out.ivec4.as_int_int_int_int +dEQP-VK.glsl.440.linkage.varying.component.frag_out.ivec4.as_int_int_ivec2 +dEQP-VK.glsl.440.linkage.varying.component.frag_out.ivec4.as_int_ivec2_int +dEQP-VK.glsl.440.linkage.varying.component.frag_out.ivec4.as_int_ivec3 +dEQP-VK.glsl.440.linkage.varying.component.frag_out.ivec4.as_ivec2_int_int +dEQP-VK.glsl.440.linkage.varying.component.frag_out.ivec4.as_ivec2_ivec2 +dEQP-VK.glsl.440.linkage.varying.component.frag_out.ivec4.as_ivec3_int dEQP-VK.glsl.derivate.dfdx.constant.float dEQP-VK.glsl.derivate.dfdx.constant.vec2 dEQP-VK.glsl.derivate.dfdx.constant.vec3 diff --git a/framework/opengl/gluShaderLibrary.cpp b/framework/opengl/gluShaderLibrary.cpp index fbfeded..892c88b 100644 --- a/framework/opengl/gluShaderLibrary.cpp +++ b/framework/opengl/gluShaderLibrary.cpp @@ -335,6 +335,8 @@ private: TOKEN_GROUP, TOKEN_CASE, TOKEN_END, + TOKEN_OUTPUT_COLOR, + TOKEN_FORMAT, TOKEN_VALUES, TOKEN_BOTH, TOKEN_VERTEX, @@ -414,6 +416,7 @@ private: deUint32 parseShaderStageList (void); void parseRequirement (CaseRequirement& valueBlock); void parseExpectResult (ExpectResult& expectResult); + void parseFormat (DataType& format); void parseGLSLVersion (glu::GLSLVersion& version); void parsePipelineProgram (ProgramSpecification& program); void parseShaderCase (vector& shaderNodeList); @@ -612,6 +615,8 @@ void ShaderParser::advanceToken (void) { "group", TOKEN_GROUP }, { "case", TOKEN_CASE }, { "end", TOKEN_END }, + { "output_color", TOKEN_OUTPUT_COLOR }, + { "format", TOKEN_FORMAT }, { "values", TOKEN_VALUES }, { "both", TOKEN_BOTH }, { "vertex", TOKEN_VERTEX }, @@ -1245,6 +1250,12 @@ void ShaderParser::parseExpectResult (ExpectResult& expectResult) advanceToken(); } +void ShaderParser::parseFormat (DataType& format) +{ + format = mapDataTypeToken(m_curToken); + advanceToken(); +} + void ShaderParser::parseGLSLVersion (glu::GLSLVersion& version) { int versionNum = 0; @@ -1353,6 +1364,8 @@ void ShaderParser::parseShaderCase (vector& shaderNodeList) // Setup case. GLSLVersion version = DEFAULT_GLSL_VERSION; ExpectResult expectResult = EXPECT_PASS; + OutputType outputType = OUTPUT_RESULT; + DataType format = TYPE_LAST; string description; string bothSource; vector vertexSources; @@ -1381,6 +1394,12 @@ void ShaderParser::parseShaderCase (vector& shaderNodeList) advanceToken(); parseExpectResult(expectResult); } + else if (m_curToken == TOKEN_OUTPUT_COLOR) + { + outputType = OUTPUT_COLOR; + advanceToken(); + parseFormat(format); + } else if (m_curToken == TOKEN_VALUES) { if (valueBlockSeen) @@ -1516,6 +1535,8 @@ void ShaderParser::parseShaderCase (vector& shaderNodeList) ShaderCaseSpecification spec; spec.caseType = CASETYPE_COMPLETE; spec.expectResult = expectResult; + spec.outputType = outputType; + spec.outputFormat = format; spec.targetVersion = version; spec.fullGLSLES100Required = fullGLSLES100Required; spec.requiredCaps = requiredCaps; diff --git a/framework/opengl/gluShaderLibrary.hpp b/framework/opengl/gluShaderLibrary.hpp index ce05193..f89aec1 100644 --- a/framework/opengl/gluShaderLibrary.hpp +++ b/framework/opengl/gluShaderLibrary.hpp @@ -57,6 +57,14 @@ enum ExpectResult EXPECT_LAST }; +enum OutputType +{ + OUTPUT_RESULT = 0, + OUTPUT_COLOR, + + OUTPUT_LAST +}; + struct Value { union Element @@ -137,6 +145,8 @@ struct ShaderCaseSpecification { CaseType caseType; ExpectResult expectResult; + OutputType outputType; + DataType outputFormat; glu::GLSLVersion targetVersion; // \todo [pyry] Clean this up @@ -149,6 +159,8 @@ struct ShaderCaseSpecification ShaderCaseSpecification (void) : caseType (CASETYPE_LAST) , expectResult (EXPECT_LAST) + , outputType (OUTPUT_RESULT) + , outputFormat (TYPE_LAST) , targetVersion (glu::GLSL_VERSION_LAST) , fullGLSLES100Required (false) { -- 2.7.4