dEQP-VK.texture.subgroup_lod.texturelod
dEQP-VK.texture.subgroup_lod.texturegrad
dEQP-VK.texture.subgroup_lod.texelfetch
-dEQP-VK.texture.conversion.b10g11r11-negative-values
+dEQP-VK.texture.conversion.ufloat_negative_values.b10g11r11
+dEQP-VK.texture.conversion.snorm_clamp.a2b10g10r10_snorm_pack32
+dEQP-VK.texture.conversion.snorm_clamp.a2r10g10b10_snorm_pack32
+dEQP-VK.texture.conversion.snorm_clamp.a8b8g8r8_snorm_pack32
+dEQP-VK.texture.conversion.snorm_clamp.b8g8r8a8_snorm
+dEQP-VK.texture.conversion.snorm_clamp.b8g8r8_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r16g16b16a16_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r16g16b16_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r16g16_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r16_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r8g8b8a8_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r8g8b8_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r8g8_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r8_snorm
dEQP-VK.geometry.layered.1d_array.64_1_4.render_to_default_layer
dEQP-VK.geometry.layered.1d_array.64_1_4.render_to_one
dEQP-VK.geometry.layered.1d_array.64_1_4.render_to_all
dEQP-VK.texture.subgroup_lod.texturelod
dEQP-VK.texture.subgroup_lod.texturegrad
dEQP-VK.texture.subgroup_lod.texelfetch
-dEQP-VK.texture.conversion.b10g11r11-negative-values
+dEQP-VK.texture.conversion.ufloat_negative_values.b10g11r11
+dEQP-VK.texture.conversion.snorm_clamp.a2b10g10r10_snorm_pack32
+dEQP-VK.texture.conversion.snorm_clamp.a2r10g10b10_snorm_pack32
+dEQP-VK.texture.conversion.snorm_clamp.a8b8g8r8_snorm_pack32
+dEQP-VK.texture.conversion.snorm_clamp.b8g8r8a8_snorm
+dEQP-VK.texture.conversion.snorm_clamp.b8g8r8_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r16g16b16a16_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r16g16b16_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r16g16_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r16_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r8g8b8a8_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r8g8b8_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r8g8_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r8_snorm
dEQP-VK.geometry.input.basic_primitive.points
dEQP-VK.geometry.input.basic_primitive.lines
dEQP-VK.geometry.input.basic_primitive.line_strip
--- /dev/null
+#!amber
+# Copyright 2020 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SHADER vertex vert_shader PASSTHROUGH
+
+SHADER fragment frag_shader GLSL
+#version 430
+layout(location = 0) out vec4 frag_out;
+uniform layout(set=0, binding=0) sampler1D tex_sampler;
+void main()
+{
+ vec4 color = texture(tex_sampler, 0.0);
+ for (int i = 0; i < 4; i++)
+ {
+ if (color[i] != -1.0)
+ {
+ frag_out = vec4(1, 0, 0, 1);
+ return;
+ }
+ }
+
+ frag_out = vec4(0, 1, 0, 1);
+}
+END
+
+IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 32 HEIGHT 32
+# The fill value has the most significant bit enabled for each component.
+IMAGE texture FORMAT A2B10G10R10_SNORM_PACK32 DIM_1D WIDTH 1 FILL 2684879360
+SAMPLER sampler
+
+PIPELINE graphics pipeline
+ ATTACH vert_shader
+ ATTACH frag_shader
+ BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER framebuffer AS color LOCATION 0
+END
+
+RUN pipeline DRAW_RECT POS 0 0 SIZE 32 32
+EXPECT framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 0 255 0 255
--- /dev/null
+#!amber
+# Copyright 2020 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SHADER vertex vert_shader PASSTHROUGH
+
+SHADER fragment frag_shader GLSL
+#version 430
+layout(location = 0) out vec4 frag_out;
+uniform layout(set=0, binding=0) sampler1D tex_sampler;
+void main()
+{
+ vec4 color = texture(tex_sampler, 0.0);
+ for (int i = 0; i < 4; i++)
+ {
+ if (color[i] != -1.0)
+ {
+ frag_out = vec4(1, 0, 0, 1);
+ return;
+ }
+ }
+
+ frag_out = vec4(0, 1, 0, 1);
+}
+END
+
+IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 32 HEIGHT 32
+# The fill value has the most significant bit enabled for each component.
+IMAGE texture FORMAT A2R10G10B10_SNORM_PACK32 DIM_1D WIDTH 1 FILL 2684879360
+SAMPLER sampler
+
+PIPELINE graphics pipeline
+ ATTACH vert_shader
+ ATTACH frag_shader
+ BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER framebuffer AS color LOCATION 0
+END
+
+RUN pipeline DRAW_RECT POS 0 0 SIZE 32 32
+EXPECT framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 0 255 0 255
--- /dev/null
+#!amber
+# Copyright 2020 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SHADER vertex vert_shader PASSTHROUGH
+
+SHADER fragment frag_shader GLSL
+#version 430
+layout(location = 0) out vec4 frag_out;
+uniform layout(set=0, binding=0) sampler1D tex_sampler;
+void main()
+{
+ vec4 color = texture(tex_sampler, 0.0);
+ for (int i = 0; i < 4; i++)
+ {
+ if (color[i] != -1.0)
+ {
+ frag_out = vec4(1, 0, 0, 1);
+ return;
+ }
+ }
+
+ frag_out = vec4(0, 1, 0, 1);
+}
+END
+
+IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 32 HEIGHT 32
+# The fill value has the most significant bit enabled for each component.
+IMAGE texture FORMAT A8B8G8R8_SNORM_PACK32 DIM_1D WIDTH 1 FILL 2155905152
+SAMPLER sampler
+
+PIPELINE graphics pipeline
+ ATTACH vert_shader
+ ATTACH frag_shader
+ BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER framebuffer AS color LOCATION 0
+END
+
+RUN pipeline DRAW_RECT POS 0 0 SIZE 32 32
+EXPECT framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 0 255 0 255
--- /dev/null
+#!amber
+# Copyright 2020 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SHADER vertex vert_shader PASSTHROUGH
+
+SHADER fragment frag_shader GLSL
+#version 430
+layout(location = 0) out vec4 frag_out;
+uniform layout(set=0, binding=0) sampler1D tex_sampler;
+void main()
+{
+ vec4 color = texture(tex_sampler, 0.0);
+ for (int i = 0; i < 3; i++)
+ {
+ if (color[i] != -1.0)
+ {
+ frag_out = vec4(1, 0, 0, 1);
+ return;
+ }
+ }
+
+ frag_out = vec4(0, 1, 0, 1);
+}
+END
+
+IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 32 HEIGHT 32
+IMAGE texture FORMAT B8G8R8_SNORM DIM_1D WIDTH 1 FILL -128
+SAMPLER sampler
+
+PIPELINE graphics pipeline
+ ATTACH vert_shader
+ ATTACH frag_shader
+ BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER framebuffer AS color LOCATION 0
+END
+
+RUN pipeline DRAW_RECT POS 0 0 SIZE 32 32
+EXPECT framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 0 255 0 255
--- /dev/null
+#!amber
+# Copyright 2020 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SHADER vertex vert_shader PASSTHROUGH
+
+SHADER fragment frag_shader GLSL
+#version 430
+layout(location = 0) out vec4 frag_out;
+uniform layout(set=0, binding=0) sampler1D tex_sampler;
+void main()
+{
+ vec4 color = texture(tex_sampler, 0.0);
+ for (int i = 0; i < 4; i++)
+ {
+ if (color[i] != -1.0)
+ {
+ frag_out = vec4(1, 0, 0, 1);
+ return;
+ }
+ }
+
+ frag_out = vec4(0, 1, 0, 1);
+}
+END
+
+IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 32 HEIGHT 32
+IMAGE texture FORMAT B8G8R8A8_SNORM DIM_1D WIDTH 1 FILL -128
+SAMPLER sampler
+
+PIPELINE graphics pipeline
+ ATTACH vert_shader
+ ATTACH frag_shader
+ BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER framebuffer AS color LOCATION 0
+END
+
+RUN pipeline DRAW_RECT POS 0 0 SIZE 32 32
+EXPECT framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 0 255 0 255
--- /dev/null
+#!amber
+# Copyright 2020 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SHADER vertex vert_shader PASSTHROUGH
+
+SHADER fragment frag_shader GLSL
+#version 430
+layout(location = 0) out vec4 frag_out;
+uniform layout(set=0, binding=0) sampler1D tex_sampler;
+void main()
+{
+ vec4 color = texture(tex_sampler, 0.0);
+ for (int i = 0; i < 1; i++)
+ {
+ if (color[i] != -1.0)
+ {
+ frag_out = vec4(1, 0, 0, 1);
+ return;
+ }
+ }
+
+ frag_out = vec4(0, 1, 0, 1);
+}
+END
+
+IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 32 HEIGHT 32
+IMAGE texture FORMAT R16_SNORM DIM_1D WIDTH 1 FILL -32768
+SAMPLER sampler
+
+PIPELINE graphics pipeline
+ ATTACH vert_shader
+ ATTACH frag_shader
+ BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER framebuffer AS color LOCATION 0
+END
+
+RUN pipeline DRAW_RECT POS 0 0 SIZE 32 32
+EXPECT framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 0 255 0 255
--- /dev/null
+#!amber
+# Copyright 2020 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SHADER vertex vert_shader PASSTHROUGH
+
+SHADER fragment frag_shader GLSL
+#version 430
+layout(location = 0) out vec4 frag_out;
+uniform layout(set=0, binding=0) sampler1D tex_sampler;
+void main()
+{
+ vec4 color = texture(tex_sampler, 0.0);
+ for (int i = 0; i < 2; i++)
+ {
+ if (color[i] != -1.0)
+ {
+ frag_out = vec4(1, 0, 0, 1);
+ return;
+ }
+ }
+
+ frag_out = vec4(0, 1, 0, 1);
+}
+END
+
+IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 32 HEIGHT 32
+IMAGE texture FORMAT R16G16_SNORM DIM_1D WIDTH 1 FILL -32768
+SAMPLER sampler
+
+PIPELINE graphics pipeline
+ ATTACH vert_shader
+ ATTACH frag_shader
+ BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER framebuffer AS color LOCATION 0
+END
+
+RUN pipeline DRAW_RECT POS 0 0 SIZE 32 32
+EXPECT framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 0 255 0 255
--- /dev/null
+#!amber
+# Copyright 2020 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SHADER vertex vert_shader PASSTHROUGH
+
+SHADER fragment frag_shader GLSL
+#version 430
+layout(location = 0) out vec4 frag_out;
+uniform layout(set=0, binding=0) sampler1D tex_sampler;
+void main()
+{
+ vec4 color = texture(tex_sampler, 0.0);
+ for (int i = 0; i < 3; i++)
+ {
+ if (color[i] != -1.0)
+ {
+ frag_out = vec4(1, 0, 0, 1);
+ return;
+ }
+ }
+
+ frag_out = vec4(0, 1, 0, 1);
+}
+END
+
+IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 32 HEIGHT 32
+IMAGE texture FORMAT R16G16B16_SNORM DIM_1D WIDTH 1 FILL -32768
+SAMPLER sampler
+
+PIPELINE graphics pipeline
+ ATTACH vert_shader
+ ATTACH frag_shader
+ BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER framebuffer AS color LOCATION 0
+END
+
+RUN pipeline DRAW_RECT POS 0 0 SIZE 32 32
+EXPECT framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 0 255 0 255
--- /dev/null
+#!amber
+# Copyright 2020 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SHADER vertex vert_shader PASSTHROUGH
+
+SHADER fragment frag_shader GLSL
+#version 430
+layout(location = 0) out vec4 frag_out;
+uniform layout(set=0, binding=0) sampler1D tex_sampler;
+void main()
+{
+ vec4 color = texture(tex_sampler, 0.0);
+ for (int i = 0; i < 4; i++)
+ {
+ if (color[i] != -1.0)
+ {
+ frag_out = vec4(1, 0, 0, 1);
+ return;
+ }
+ }
+
+ frag_out = vec4(0, 1, 0, 1);
+}
+END
+
+IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 32 HEIGHT 32
+IMAGE texture FORMAT R16G16B16A16_SNORM DIM_1D WIDTH 1 FILL -32768
+SAMPLER sampler
+
+PIPELINE graphics pipeline
+ ATTACH vert_shader
+ ATTACH frag_shader
+ BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER framebuffer AS color LOCATION 0
+END
+
+RUN pipeline DRAW_RECT POS 0 0 SIZE 32 32
+EXPECT framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 0 255 0 255
--- /dev/null
+#!amber
+# Copyright 2020 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SHADER vertex vert_shader PASSTHROUGH
+
+SHADER fragment frag_shader GLSL
+#version 430
+layout(location = 0) out vec4 frag_out;
+uniform layout(set=0, binding=0) sampler1D tex_sampler;
+void main()
+{
+ vec4 color = texture(tex_sampler, 0.0);
+ for (int i = 0; i < 1; i++)
+ {
+ if (color[i] != -1.0)
+ {
+ frag_out = vec4(1, 0, 0, 1);
+ return;
+ }
+ }
+
+ frag_out = vec4(0, 1, 0, 1);
+}
+END
+
+IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 32 HEIGHT 32
+IMAGE texture FORMAT R8_SNORM DIM_1D WIDTH 1 FILL -128
+SAMPLER sampler
+
+PIPELINE graphics pipeline
+ ATTACH vert_shader
+ ATTACH frag_shader
+ BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER framebuffer AS color LOCATION 0
+END
+
+RUN pipeline DRAW_RECT POS 0 0 SIZE 32 32
+EXPECT framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 0 255 0 255
--- /dev/null
+#!amber
+# Copyright 2020 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SHADER vertex vert_shader PASSTHROUGH
+
+SHADER fragment frag_shader GLSL
+#version 430
+layout(location = 0) out vec4 frag_out;
+uniform layout(set=0, binding=0) sampler1D tex_sampler;
+void main()
+{
+ vec4 color = texture(tex_sampler, 0.0);
+ for (int i = 0; i < 2; i++)
+ {
+ if (color[i] != -1.0)
+ {
+ frag_out = vec4(1, 0, 0, 1);
+ return;
+ }
+ }
+
+ frag_out = vec4(0, 1, 0, 1);
+}
+END
+
+IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 32 HEIGHT 32
+IMAGE texture FORMAT R8G8_SNORM DIM_1D WIDTH 1 FILL -128
+SAMPLER sampler
+
+PIPELINE graphics pipeline
+ ATTACH vert_shader
+ ATTACH frag_shader
+ BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER framebuffer AS color LOCATION 0
+END
+
+RUN pipeline DRAW_RECT POS 0 0 SIZE 32 32
+EXPECT framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 0 255 0 255
--- /dev/null
+#!amber
+# Copyright 2020 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SHADER vertex vert_shader PASSTHROUGH
+
+SHADER fragment frag_shader GLSL
+#version 430
+layout(location = 0) out vec4 frag_out;
+uniform layout(set=0, binding=0) sampler1D tex_sampler;
+void main()
+{
+ vec4 color = texture(tex_sampler, 0.0);
+ for (int i = 0; i < 3; i++)
+ {
+ if (color[i] != -1.0)
+ {
+ frag_out = vec4(1, 0, 0, 1);
+ return;
+ }
+ }
+
+ frag_out = vec4(0, 1, 0, 1);
+}
+END
+
+IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 32 HEIGHT 32
+IMAGE texture FORMAT R8G8B8_SNORM DIM_1D WIDTH 1 FILL -128
+SAMPLER sampler
+
+PIPELINE graphics pipeline
+ ATTACH vert_shader
+ ATTACH frag_shader
+ BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER framebuffer AS color LOCATION 0
+END
+
+RUN pipeline DRAW_RECT POS 0 0 SIZE 32 32
+EXPECT framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 0 255 0 255
--- /dev/null
+#!amber
+# Copyright 2020 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SHADER vertex vert_shader PASSTHROUGH
+
+SHADER fragment frag_shader GLSL
+#version 430
+layout(location = 0) out vec4 frag_out;
+uniform layout(set=0, binding=0) sampler1D tex_sampler;
+void main()
+{
+ vec4 color = texture(tex_sampler, 0.0);
+ for (int i = 0; i < 4; i++)
+ {
+ if (color[i] != -1.0)
+ {
+ frag_out = vec4(1, 0, 0, 1);
+ return;
+ }
+ }
+
+ frag_out = vec4(0, 1, 0, 1);
+}
+END
+
+IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 32 HEIGHT 32
+IMAGE texture FORMAT R8G8B8A8_SNORM DIM_1D WIDTH 1 FILL -128
+SAMPLER sampler
+
+PIPELINE graphics pipeline
+ ATTACH vert_shader
+ ATTACH frag_shader
+ BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER framebuffer AS color LOCATION 0
+END
+
+RUN pipeline DRAW_RECT POS 0 0 SIZE 32 32
+EXPECT framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 0 255 0 255
#include "tcuResource.hpp"
#include "tcuTestLog.hpp"
#include "vkSpirVProgram.hpp"
+#include "vkImageUtil.hpp"
namespace vkt
{
delete m_recipe;
}
-TestInstance* AmberTestCase::createInstance(Context& ctx) const
+TestInstance* AmberTestCase::createInstance (Context& ctx) const
{
return new AmberTestInstance(ctx, m_recipe);
}
-static amber::EngineConfig* createEngineConfig(Context& ctx)
+static amber::EngineConfig* createEngineConfig (Context& ctx)
{
- amber::EngineConfig* vkConfig = GetVulkanConfig(ctx.getInstance(),
+ amber::EngineConfig* vkConfig = GetVulkanConfig(ctx.getInstance(),
ctx.getPhysicalDevice(), ctx.getDevice(), &ctx.getDeviceFeatures(),
&ctx.getDeviceFeatures2(), ctx.getInstanceExtensions(),
ctx.getDeviceExtensions(), ctx.getUniversalQueueFamilyIndex(),
TCU_THROW(NotSupportedError, message.c_str());
}
}
+
+ for (auto req : m_imageRequirements)
+ checkImageSupport(ctx.getInstanceInterface(), ctx.getPhysicalDevice(), req);
}
class Delegate : public amber::Delegate
return {};
}
-bool AmberTestCase::parse(const std::string& readFilename)
+bool AmberTestCase::parse (const std::string& readFilename)
{
std::string script = ShaderSourceProvider::getSource(m_testCtx.getArchive(), readFilename.c_str());
if (script.empty())
return true;
}
-void AmberTestCase::initPrograms(vk::SourceCollections& programCollection) const
+void AmberTestCase::initPrograms (vk::SourceCollections& programCollection) const
{
std::vector<amber::ShaderInfo> shaders = m_recipe->GetShaderInfo();
for (size_t i = 0; i < shaders.size(); ++i)
return r.IsSuccess() ? tcu::TestStatus::pass("Pass") :tcu::TestStatus::fail("Fail");
}
-void AmberTestCase::setSpirVAsmBuildOptions(const vk::SpirVAsmBuildOptions& asm_options)
+void AmberTestCase::setSpirVAsmBuildOptions (const vk::SpirVAsmBuildOptions& asm_options)
{
m_asm_options = asm_options;
}
-void AmberTestCase::addRequirement(const std::string& requirement)
+void AmberTestCase::addRequirement (const std::string& requirement)
{
if (requirement.find(".") != std::string::npos)
m_required_features.insert(requirement);
m_required_extensions.insert(requirement);
}
+void AmberTestCase::addImageRequirement (vk::VkImageCreateInfo info)
+{
+ m_imageRequirements.push_back(info);
+}
+
} // cts_amber
} // vkt
// An instance or device extension will not have a period in its name.
void addRequirement(const std::string& requirement);
+ void addImageRequirement(vk::VkImageCreateInfo info);
+
private:
bool parse (const std::string& readFilename);
// An example entry is: "VariablePointerFeatures.variablePointers".
// Use a set for consistent ordering.
std::set<std::string> m_required_features;
+
+ std::vector<vk::VkImageCreateInfo> m_imageRequirements;
};
-AmberTestCase* createAmberTestCase (tcu::TestContext& testCtx,
- const char* name,
- const char* description,
- const char* category,
- const std::string& filename,
- const std::vector<std::string> requirements = std::vector<std::string>());
+AmberTestCase* createAmberTestCase (tcu::TestContext& testCtx,
+ const char* name,
+ const char* description,
+ const char* category,
+ const std::string& filename,
+ const std::vector<std::string> requirements = std::vector<std::string>(),
+ const std::vector<vk::VkImageCreateInfo> imageRequirements = std::vector<vk::VkImageCreateInfo>());
void createAmberTestsFromIndexFile (tcu::TestContext& testCtx,
tcu::TestCaseGroup* group,
} while (testCase);
}
-AmberTestCase* createAmberTestCase (tcu::TestContext& testCtx,
- const char* name,
- const char* description,
- const char* category,
- const std::string& filename,
- const std::vector<std::string> requirements)
+AmberTestCase* createAmberTestCase (tcu::TestContext& testCtx,
+ const char* name,
+ const char* description,
+ const char* category,
+ const std::string& filename,
+ const std::vector<std::string> requirements,
+ const std::vector<vk::VkImageCreateInfo> imageRequirements)
+
{
// shader_test files are saved in <path>/external/vulkancts/data/vulkan/amber/<categoryname>/
std::string readFilename("vulkan/amber/");
for (auto req : requirements)
testCase->addRequirement(req);
+ for (auto req : imageRequirements)
+ testCase->addImageRequirement(req);
+
return testCase;
}
namespace
{
+void populateUfloatNegativeValuesTests (tcu::TestCaseGroup* group)
+{
+ tcu::TestContext& testCtx = group->getTestContext();
+ VkImageUsageFlags usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_STORAGE_BIT;
+
+ VkImageCreateInfo info =
+ {
+ VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, // VkStructureType sType
+ DE_NULL, // const void* pNext
+ 0, // VkImageCreateFlags flags
+ VK_IMAGE_TYPE_2D, // VkImageType imageType
+ VK_FORMAT_B10G11R11_UFLOAT_PACK32, // VkFormat format
+ {50u, 50u, 1u}, // VkExtent3D extent
+ 1u, // uint32_t mipLevels
+ 1u, // uint32_t arrayLayers
+ VK_SAMPLE_COUNT_1_BIT, // VkSampleCountFlagBits samples
+ VK_IMAGE_TILING_OPTIMAL, // VkImageTiling tiling
+ usage, // VkImageUsageFlags usage
+ VK_SHARING_MODE_EXCLUSIVE, // VkSharingMode sharingMode
+ 0u, // uint32_t queueFamilyIndexCount
+ DE_NULL, // const uint32_t* pQueueFamilyIndices
+ VK_IMAGE_LAYOUT_UNDEFINED // VkImageLayout initialLayout
+ };
+
+ group->addChild(cts_amber::createAmberTestCase(testCtx, "b10g11r11", "", "texture/conversion/ufloat_negative_values", "b10g11r11-ufloat-pack32.amber",
+ std::vector<std::string>(), std::vector<VkImageCreateInfo>(1, info)));
+}
+
+void populateSnormClampTests (tcu::TestCaseGroup* group)
+{
+ tcu::TestContext& testCtx = group->getTestContext();
+ VkImageUsageFlags usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT;
+
+ VkImageCreateInfo info =
+ {
+ VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, // VkStructureType sType
+ DE_NULL, // const void* pNext
+ 0, // VkImageCreateFlags flags
+ VK_IMAGE_TYPE_1D, // VkImageType imageType
+ VK_FORMAT_UNDEFINED, // VkFormat format
+ {1u, 1u, 1u}, // VkExtent3D extent
+ 1u, // uint32_t mipLevels
+ 1u, // uint32_t arrayLayers
+ VK_SAMPLE_COUNT_1_BIT, // VkSampleCountFlagBits samples
+ VK_IMAGE_TILING_OPTIMAL, // VkImageTiling tiling
+ usage, // VkImageUsageFlags usage
+ VK_SHARING_MODE_EXCLUSIVE, // VkSharingMode sharingMode
+ 0u, // uint32_t queueFamilyIndexCount
+ DE_NULL, // const uint32_t* pQueueFamilyIndices
+ VK_IMAGE_LAYOUT_UNDEFINED // VkImageLayout initialLayout
+ };
+
+ struct TestParams
+ {
+ std::string testName;
+ std::string amberFile;
+ VkFormat format;
+ } params[] =
+ {
+ { "a2b10g10r10_snorm_pack32", "a2b10g10r10-snorm-pack32.amber", VK_FORMAT_A2B10G10R10_SNORM_PACK32 },
+ { "a2r10g10b10_snorm_pack32", "a2r10g10b10-snorm-pack32.amber", VK_FORMAT_A2R10G10B10_SNORM_PACK32 },
+ { "a8b8g8r8_snorm_pack32", "a8b8g8r8-snorm-pack32.amber", VK_FORMAT_A8B8G8R8_SNORM_PACK32 },
+ { "b8g8r8a8_snorm", "b8g8r8a8-snorm.amber", VK_FORMAT_B8G8R8A8_SNORM },
+ { "b8g8r8_snorm", "b8g8r8-snorm.amber", VK_FORMAT_B8G8R8_SNORM },
+ { "r16g16b16a16_snorm", "r16g16b16a16-snorm.amber", VK_FORMAT_R16G16B16A16_SNORM },
+ { "r16g16b16_snorm", "r16g16b16-snorm.amber", VK_FORMAT_R16G16B16_SNORM },
+ { "r16g16_snorm", "r16g16-snorm.amber", VK_FORMAT_R16G16_SNORM },
+ { "r16_snorm", "r16-snorm.amber", VK_FORMAT_R16_SNORM },
+ { "r8g8b8a8_snorm", "r8g8b8a8-snorm.amber", VK_FORMAT_R8G8B8A8_SNORM },
+ { "r8g8b8_snorm", "r8g8b8-snorm.amber", VK_FORMAT_R8G8B8_SNORM },
+ { "r8g8_snorm", "r8g8-snorm.amber", VK_FORMAT_R8G8_SNORM },
+ { "r8_snorm", "r8-snorm.amber", VK_FORMAT_R8_SNORM }
+ };
+
+ for (const auto& param : params)
+ {
+ info.format = param.format;
+ group->addChild(cts_amber::createAmberTestCase(testCtx, param.testName.c_str(), "", "texture/conversion/snorm_clamp", param.amberFile.c_str(),
+ std::vector<std::string>(), std::vector<VkImageCreateInfo>(1, info)));
+ }
+}
+
void populateTextureConversionTests (tcu::TestCaseGroup* group)
{
tcu::TestContext& testCtx = group->getTestContext();
- group->addChild(cts_amber::createAmberTestCase(testCtx, "b10g11r11-negative-values", "", "texture/conversion", "b10g11r11-ufloat-pack32-negative-values.amber"));
+ group->addChild(createTestGroup(testCtx, "ufloat_negative_values", "Tests for converting negative floats to unsigned floats", populateUfloatNegativeValuesTests));
+ group->addChild(createTestGroup(testCtx, "snorm_clamp", "Tests for SNORM corner cases when smallest negative number gets clamped to -1", populateSnormClampTests));
}
} // anonymous
dEQP-VK.texture.subgroup_lod.texturelod
dEQP-VK.texture.subgroup_lod.texturegrad
dEQP-VK.texture.subgroup_lod.texelfetch
-dEQP-VK.texture.conversion.b10g11r11-negative-values
+dEQP-VK.texture.conversion.ufloat_negative_values.b10g11r11
+dEQP-VK.texture.conversion.snorm_clamp.a2b10g10r10_snorm_pack32
+dEQP-VK.texture.conversion.snorm_clamp.a2r10g10b10_snorm_pack32
+dEQP-VK.texture.conversion.snorm_clamp.a8b8g8r8_snorm_pack32
+dEQP-VK.texture.conversion.snorm_clamp.b8g8r8a8_snorm
+dEQP-VK.texture.conversion.snorm_clamp.b8g8r8_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r16g16b16a16_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r16g16b16_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r16g16_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r16_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r8g8b8a8_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r8g8b8_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r8g8_snorm
+dEQP-VK.texture.conversion.snorm_clamp.r8_snorm
dEQP-VK.geometry.input.basic_primitive.points
dEQP-VK.geometry.input.basic_primitive.lines
dEQP-VK.geometry.input.basic_primitive.line_strip