Add coverage for depth bias with polygon topologies and fill modes

In these test we are applying the depth bias by using
depthBiasConstantFactor. Polygon topologies with fill, line and point
polygon modes are tested.

Components: Vulkan

VK-GL-CTS Issue: 3055

New tests: dEQP-VK.draw.renderpass.depth_bias.depth_bias_*

Change-Id: I5cb5a1c8ee13fa0f6c56edaf21eda4e19b6d144c
diff --git a/AndroidGen.mk b/AndroidGen.mk
index a507323..57e22ad 100644
--- a/AndroidGen.mk
+++ b/AndroidGen.mk
@@ -128,6 +128,7 @@
 	external/vulkancts/modules/vulkan/draw/vktDrawBufferObjectUtil.cpp \
 	external/vulkancts/modules/vulkan/draw/vktDrawConcurrentTests.cpp \
 	external/vulkancts/modules/vulkan/draw/vktDrawCreateInfoUtil.cpp \
+	external/vulkancts/modules/vulkan/draw/vktDrawDepthBiasTests.cpp \
 	external/vulkancts/modules/vulkan/draw/vktDrawDepthClampTests.cpp \
 	external/vulkancts/modules/vulkan/draw/vktDrawDifferingInterpolationTests.cpp \
 	external/vulkancts/modules/vulkan/draw/vktDrawDiscardRectanglesTests.cpp \
diff --git a/android/cts/main/vk-master-2022-03-01/draw.txt b/android/cts/main/vk-master-2022-03-01/draw.txt
index dd7298c..ae0d4f9 100644
--- a/android/cts/main/vk-master-2022-03-01/draw.txt
+++ b/android/cts/main/vk-master-2022-03-01/draw.txt
@@ -5702,6 +5702,12 @@
 dEQP-VK.draw.renderpass.multi_draw.overlapping.indexed_packed.max_draws.stride_extra_12.1_instance.tess_geom.single_view.offset_6
 dEQP-VK.draw.renderpass.multi_draw.overlapping.indexed_packed.max_draws.stride_extra_12.1_instance.tess_geom.multiview.no_offset
 dEQP-VK.draw.renderpass.multi_draw.overlapping.indexed_packed.max_draws.stride_extra_12.1_instance.tess_geom.multiview.offset_6
+dEQP-VK.draw.renderpass.depth_bias.depth_bias_triangle_list_fill
+dEQP-VK.draw.renderpass.depth_bias.depth_bias_triangle_list_line
+dEQP-VK.draw.renderpass.depth_bias.depth_bias_triangle_list_point
+dEQP-VK.draw.renderpass.depth_bias.depth_bias_patch_list_tri_fill
+dEQP-VK.draw.renderpass.depth_bias.depth_bias_patch_list_tri_line
+dEQP-VK.draw.renderpass.depth_bias.depth_bias_patch_list_tri_point
 dEQP-VK.draw.dynamic_rendering.concurrent.compute_and_triangle_list
 dEQP-VK.draw.dynamic_rendering.simple_draw.simple_draw_triangle_list
 dEQP-VK.draw.dynamic_rendering.simple_draw.simple_draw_triangle_strip
diff --git a/android/cts/main/vk-master/draw.txt b/android/cts/main/vk-master/draw.txt
index 2f4f676..a00cf05 100644
--- a/android/cts/main/vk-master/draw.txt
+++ b/android/cts/main/vk-master/draw.txt
@@ -6703,6 +6703,12 @@
 dEQP-VK.draw.renderpass.multi_draw.overlapping.indexed_packed.max_draws.stride_extra_12.1_instance.tess_geom.single_view.offset_6
 dEQP-VK.draw.renderpass.multi_draw.overlapping.indexed_packed.max_draws.stride_extra_12.1_instance.tess_geom.multiview.no_offset
 dEQP-VK.draw.renderpass.multi_draw.overlapping.indexed_packed.max_draws.stride_extra_12.1_instance.tess_geom.multiview.offset_6
+dEQP-VK.draw.renderpass.depth_bias.depth_bias_triangle_list_fill
+dEQP-VK.draw.renderpass.depth_bias.depth_bias_triangle_list_line
+dEQP-VK.draw.renderpass.depth_bias.depth_bias_triangle_list_point
+dEQP-VK.draw.renderpass.depth_bias.depth_bias_patch_list_tri_fill
+dEQP-VK.draw.renderpass.depth_bias.depth_bias_patch_list_tri_line
+dEQP-VK.draw.renderpass.depth_bias.depth_bias_patch_list_tri_point
 dEQP-VK.draw.renderpass.output_location.array.b10g11r11-ufloat-pack32-highp
 dEQP-VK.draw.renderpass.output_location.array.b10g11r11-ufloat-pack32-highp-output-float
 dEQP-VK.draw.renderpass.output_location.array.b10g11r11-ufloat-pack32-highp-output-vec2
diff --git a/external/vulkancts/data/vulkan/amber/draw/depth_bias/depth_bias_patch_list_tri_fill.amber b/external/vulkancts/data/vulkan/amber/draw/depth_bias/depth_bias_patch_list_tri_fill.amber
new file mode 100644
index 0000000..7fceb55
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/draw/depth_bias/depth_bias_patch_list_tri_fill.amber
@@ -0,0 +1,224 @@
+#!amber
+# Copyright 2021 Google LLC.
+# Copyright 2021 The Khronos Group Inc.
+#
+# 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.
+#
+# Red rect. fragDepth:    0.17
+# Green rect. fragDepth:  0.18
+# Depth color format:     D16_UNORM
+# Depth bias:             -0.01068115234375 (-700.0 / 2^16)
+# Draw method:            Patch List
+# Polygon Mode:           Fill
+# TES primitive ordering: trianges, cw
+# Result:                 Green rectangle should be on top.
+
+DEVICE_FEATURE tessellationShader
+
+SHADER vertex vert GLSL
+#version 450
+
+layout (location = 0) in vec3 inPosition;
+layout (location = 1) in vec4 inColor;
+layout (location = 0) out vec4 outColor;
+
+void main(void)
+{
+  gl_Position = vec4(inPosition, 1.0);
+  outColor = inColor;
+}
+END
+
+SHADER tessellation_control tesc GLSL
+#version 450
+
+layout (location = 0) in vec4 inColor[];
+layout (location = 0) patch out vec4 tcColor;
+layout (vertices = 3) out;
+
+void main(void)
+{
+  float tessLevel = 2.0;
+
+  gl_TessLevelInner[0] = tessLevel;
+  gl_TessLevelInner[1] = tessLevel;
+  gl_TessLevelOuter[0] = 1.0;
+  gl_TessLevelOuter[1] = 1.0;
+  gl_TessLevelOuter[2] = 1.0;
+
+  gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
+  tcColor = inColor[gl_InvocationID];
+}
+END
+
+SHADER tessellation_evaluation tese GLSL
+#version 450
+
+layout (triangles, equal_spacing, cw) in;
+layout (location = 0) patch in vec4 patch_color;
+layout (location = 0) out vec4 tes_color;
+
+void main(void)
+{
+  gl_Position = (gl_TessCoord.x * gl_in[0].gl_Position) +
+                (gl_TessCoord.y * gl_in[1].gl_Position) +
+                (gl_TessCoord.z * gl_in[2].gl_Position);
+
+  tes_color = patch_color;
+}
+END
+
+SHADER fragment frag GLSL
+#version 450
+
+layout (location = 0) in vec4 inColor;
+layout (location = 0) out vec4 outColor;
+
+void main(void)
+{
+  outColor = inColor;
+}
+END
+
+BUFFER vertexPositionA DATA_TYPE vec3<float> DATA
+-0.50 -0.50  0.17
+ 0.50 -0.50  0.17
+ 0.50  0.50  0.17
+ 0.50  0.50  0.17
+-0.50  0.50  0.17
+-0.50 -0.50  0.17
+END
+
+BUFFER vertexPositionB DATA_TYPE vec3<float> DATA
+-0.50 -0.50  0.18
+ 0.50 -0.50  0.18
+ 0.50  0.50  0.18
+ 0.50  0.50  0.18
+-0.50  0.50  0.18
+-0.50 -0.50  0.18
+END
+
+BUFFER vertexColorA DATA_TYPE vec4<float> DATA
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+END
+
+BUFFER vertexColorB DATA_TYPE vec4<float> DATA
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+END
+
+BUFFER framebuffer FORMAT R8G8B8A8_UNORM
+IMAGE verifyImage FORMAT R8G8B8A8_UNORM DIM_2D WIDTH 100 HEIGHT 100 FILL 0
+BUFFER depth_buf FORMAT D16_UNORM
+
+PIPELINE graphics pipeline1
+  ATTACH vert
+  ATTACH tesc
+  ATTACH tese
+  ATTACH frag
+
+  POLYGON_MODE fill
+  PATCH_CONTROL_POINTS 3
+
+  DEPTH
+    TEST on
+    WRITE on
+    COMPARE_OP less
+    CLAMP off
+    BOUNDS min 0.0 max 1.0
+    BIAS constant 0.0 clamp 0.0 slope 0.0
+  END
+
+  FRAMEBUFFER_SIZE 100 100
+  VERTEX_DATA vertexPositionA LOCATION 0
+  VERTEX_DATA vertexColorA LOCATION 1
+  BIND BUFFER framebuffer AS color LOCATION 0
+  BIND BUFFER depth_buf AS depth_stencil
+END
+
+PIPELINE graphics pipeline2
+  ATTACH vert
+  ATTACH tesc
+  ATTACH tese
+  ATTACH frag
+
+  POLYGON_MODE fill
+  PATCH_CONTROL_POINTS 3
+
+  DEPTH
+    TEST on
+    WRITE on
+    COMPARE_OP less
+    CLAMP off
+    BOUNDS min 0.0 max 1.0
+    BIAS constant -700.0 clamp 0.0 slope 0.0
+  END
+
+  FRAMEBUFFER_SIZE 100 100
+  VERTEX_DATA vertexPositionB LOCATION 0
+  VERTEX_DATA vertexColorB LOCATION 1
+  BIND BUFFER framebuffer AS color LOCATION 0
+  BIND BUFFER depth_buf AS depth_stencil
+END
+
+CLEAR_COLOR pipeline1 0 0 0 255
+CLEAR_DEPTH pipeline1 0.3
+CLEAR pipeline1
+
+CLEAR_COLOR pipeline2 0 0 0 255
+
+RUN pipeline1 DRAW_ARRAY AS PATCH_LIST START_IDX 0 COUNT 6
+RUN pipeline2 DRAW_ARRAY AS PATCH_LIST START_IDX 0 COUNT 6
+
+# ---------------- VERIFY PIPELINE ------------------
+# This pipeline verifies the frame buffer contents.
+# The compute shader writes color green if the value is expected,
+# otherwise red.
+
+SHADER compute comp_shader GLSL
+#version 450
+
+layout(local_size_x=10,local_size_y=10) in;
+uniform layout(set=0, binding=0, rgba8) image2D resultImage;
+uniform layout(set=0, binding=1, rgba8) image2D verifyImage;
+
+void main()
+{
+  ivec2 uv = ivec2(gl_GlobalInvocationID.xy);
+  vec4 color = imageLoad(resultImage, uv);
+
+  if(color.r == 0.0 && color.a == 1.0) imageStore(verifyImage, uv, vec4(0.0, 1.0, 0.0, 1.0));
+  else imageStore(verifyImage, uv, vec4(1.0, 0.0, 0.0, 1.0));
+}
+END
+
+PIPELINE compute verify_pipeline
+  ATTACH comp_shader
+
+  FRAMEBUFFER_SIZE 100 100
+  BIND BUFFER framebuffer AS storage_image DESCRIPTOR_SET 0 BINDING 0
+  BIND BUFFER verifyImage AS storage_image DESCRIPTOR_SET 0 BINDING 1
+END
+
+RUN verify_pipeline 10 10 1
+
+EXPECT verifyImage IDX 0 0 SIZE 100 100 EQ_RGBA   0 255   0 255
\ No newline at end of file
diff --git a/external/vulkancts/data/vulkan/amber/draw/depth_bias/depth_bias_patch_list_tri_line.amber b/external/vulkancts/data/vulkan/amber/draw/depth_bias/depth_bias_patch_list_tri_line.amber
new file mode 100644
index 0000000..1970c7a
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/draw/depth_bias/depth_bias_patch_list_tri_line.amber
@@ -0,0 +1,225 @@
+#!amber
+# Copyright 2021 Google LLC.
+# Copyright 2021 The Khronos Group Inc.
+#
+# 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.
+#
+# Red rect. fragDepth:    0.17
+# Green rect. fragDepth:  0.18
+# Depth color format:     D16_UNORM
+# Depth bias:             -0.01068115234375 (-700.0 / 2^16)
+# Draw method:            Patch List
+# Polygon Mode:           Line
+# TES primitive ordering: trianges, cw
+# Result:                 Green rectangle should be on top.
+
+DEVICE_FEATURE tessellationShader
+DEVICE_FEATURE fillModeNonSolid
+
+SHADER vertex vert GLSL
+#version 450
+
+layout (location = 0) in vec3 inPosition;
+layout (location = 1) in vec4 inColor;
+layout (location = 0) out vec4 outColor;
+
+void main(void)
+{
+  gl_Position = vec4(inPosition, 1.0);
+  outColor = inColor;
+}
+END
+
+SHADER tessellation_control tesc GLSL
+#version 450
+
+layout (location = 0) in vec4 inColor[];
+layout (location = 0) patch out vec4 tcColor;
+layout (vertices = 3) out;
+
+void main(void)
+{
+  float tessLevel = 2.0;
+
+  gl_TessLevelInner[0] = tessLevel;
+  gl_TessLevelInner[1] = tessLevel;
+  gl_TessLevelOuter[0] = 1.0;
+  gl_TessLevelOuter[1] = 1.0;
+  gl_TessLevelOuter[2] = 1.0;
+
+  gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
+  tcColor = inColor[gl_InvocationID];
+}
+END
+
+SHADER tessellation_evaluation tese GLSL
+#version 450
+
+layout (triangles, equal_spacing, cw) in;
+layout (location = 0) patch in vec4 patch_color;
+layout (location = 0) out vec4 tes_color;
+
+void main(void)
+{
+  gl_Position = (gl_TessCoord.x * gl_in[0].gl_Position) +
+                (gl_TessCoord.y * gl_in[1].gl_Position) +
+                (gl_TessCoord.z * gl_in[2].gl_Position);
+
+  tes_color = patch_color;
+}
+END
+
+SHADER fragment frag GLSL
+#version 450
+
+layout (location = 0) in vec4 inColor;
+layout (location = 0) out vec4 outColor;
+
+void main(void)
+{
+  outColor = inColor;
+}
+END
+
+BUFFER vertexPositionA DATA_TYPE vec3<float> DATA
+-0.50 -0.50  0.17
+ 0.50 -0.50  0.17
+ 0.50  0.50  0.17
+ 0.50  0.50  0.17
+-0.50  0.50  0.17
+-0.50 -0.50  0.17
+END
+
+BUFFER vertexPositionB DATA_TYPE vec3<float> DATA
+-0.50 -0.50  0.18
+ 0.50 -0.50  0.18
+ 0.50  0.50  0.18
+ 0.50  0.50  0.18
+-0.50  0.50  0.18
+-0.50 -0.50  0.18
+END
+
+BUFFER vertexColorA DATA_TYPE vec4<float> DATA
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+END
+
+BUFFER vertexColorB DATA_TYPE vec4<float> DATA
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+END
+
+BUFFER framebuffer FORMAT R8G8B8A8_UNORM
+IMAGE verifyImage FORMAT R8G8B8A8_UNORM DIM_2D WIDTH 100 HEIGHT 100 FILL 0
+BUFFER depth_buf FORMAT D16_UNORM
+
+PIPELINE graphics pipeline1
+  ATTACH vert
+  ATTACH tesc
+  ATTACH tese
+  ATTACH frag
+
+  POLYGON_MODE line
+  PATCH_CONTROL_POINTS 3
+
+  DEPTH
+    TEST on
+    WRITE on
+    COMPARE_OP less
+    CLAMP off
+    BOUNDS min 0.0 max 1.0
+    BIAS constant 0.0 clamp 0.0 slope 0.0
+  END
+
+  FRAMEBUFFER_SIZE 100 100
+  VERTEX_DATA vertexPositionA LOCATION 0
+  VERTEX_DATA vertexColorA LOCATION 1
+  BIND BUFFER framebuffer AS color LOCATION 0
+  BIND BUFFER depth_buf AS depth_stencil
+END
+
+PIPELINE graphics pipeline2
+  ATTACH vert
+  ATTACH tesc
+  ATTACH tese
+  ATTACH frag
+
+  POLYGON_MODE line
+  PATCH_CONTROL_POINTS 3
+
+  DEPTH
+    TEST on
+    WRITE on
+    COMPARE_OP less
+    CLAMP off
+    BOUNDS min 0.0 max 1.0
+    BIAS constant -700.0 clamp 0.0 slope 0.0
+  END
+
+  FRAMEBUFFER_SIZE 100 100
+  VERTEX_DATA vertexPositionB LOCATION 0
+  VERTEX_DATA vertexColorB LOCATION 1
+  BIND BUFFER framebuffer AS color LOCATION 0
+  BIND BUFFER depth_buf AS depth_stencil
+END
+
+CLEAR_COLOR pipeline1 0 0 0 255
+CLEAR_DEPTH pipeline1 0.3
+CLEAR pipeline1
+
+CLEAR_COLOR pipeline2 0 0 0 255
+
+RUN pipeline1 DRAW_ARRAY AS PATCH_LIST START_IDX 0 COUNT 6
+RUN pipeline2 DRAW_ARRAY AS PATCH_LIST START_IDX 0 COUNT 6
+
+# ---------------- VERIFY PIPELINE ------------------
+# This pipeline verifies the frame buffer contents.
+# The compute shader writes color green if the value is expected,
+# otherwise red.
+
+SHADER compute comp_shader GLSL
+#version 450
+
+layout(local_size_x=10,local_size_y=10) in;
+uniform layout(set=0, binding=0, rgba8) image2D resultImage;
+uniform layout(set=0, binding=1, rgba8) image2D verifyImage;
+
+void main()
+{
+  ivec2 uv = ivec2(gl_GlobalInvocationID.xy);
+  vec4 color = imageLoad(resultImage, uv);
+
+  if(color.r == 0.0 && color.a == 1.0) imageStore(verifyImage, uv, vec4(0.0, 1.0, 0.0, 1.0));
+  else imageStore(verifyImage, uv, vec4(1.0, 0.0, 0.0, 1.0));
+}
+END
+
+PIPELINE compute verify_pipeline
+  ATTACH comp_shader
+
+  FRAMEBUFFER_SIZE 100 100
+  BIND BUFFER framebuffer AS storage_image DESCRIPTOR_SET 0 BINDING 0
+  BIND BUFFER verifyImage AS storage_image DESCRIPTOR_SET 0 BINDING 1
+END
+
+RUN verify_pipeline 10 10 1
+
+EXPECT verifyImage IDX 0 0 SIZE 100 100 EQ_RGBA   0 255   0 255
\ No newline at end of file
diff --git a/external/vulkancts/data/vulkan/amber/draw/depth_bias/depth_bias_patch_list_tri_point.amber b/external/vulkancts/data/vulkan/amber/draw/depth_bias/depth_bias_patch_list_tri_point.amber
new file mode 100644
index 0000000..dd7d45b
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/draw/depth_bias/depth_bias_patch_list_tri_point.amber
@@ -0,0 +1,225 @@
+#!amber
+# Copyright 2021 Google LLC.
+# Copyright 2021 The Khronos Group Inc.
+#
+# 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.
+#
+# Red rect. fragDepth:    0.17
+# Green rect. fragDepth:  0.18
+# Depth color format:     D16_UNORM
+# Depth bias:             -0.01068115234375 (-700.0 / 2^16)
+# Draw method:            Patch List
+# Polygon Mode:           Point
+# TES primitive ordering: trianges, cw
+# Result:                 Green rectangle should be on top.
+
+DEVICE_FEATURE tessellationShader
+DEVICE_FEATURE fillModeNonSolid
+
+SHADER vertex vert GLSL
+#version 450
+
+layout (location = 0) in vec3 inPosition;
+layout (location = 1) in vec4 inColor;
+layout (location = 0) out vec4 outColor;
+
+void main(void)
+{
+  gl_Position = vec4(inPosition, 1.0);
+  outColor = inColor;
+}
+END
+
+SHADER tessellation_control tesc GLSL
+#version 450
+
+layout (location = 0) in vec4 inColor[];
+layout (location = 0) patch out vec4 tcColor;
+layout (vertices = 3) out;
+
+void main(void)
+{
+  float tessLevel = 5.0;
+
+  gl_TessLevelOuter[0] = tessLevel;
+  gl_TessLevelOuter[1] = tessLevel;
+  gl_TessLevelOuter[0] = 1.0;
+  gl_TessLevelOuter[1] = 1.0;
+  gl_TessLevelOuter[2] = 1.0;
+
+  gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
+  tcColor = inColor[gl_InvocationID];
+}
+END
+
+SHADER tessellation_evaluation tese GLSL
+#version 450
+
+layout (triangles, equal_spacing, cw) in;
+layout (location = 0) patch in vec4 patch_color;
+layout (location = 0) out vec4 tes_color;
+
+void main(void)
+{
+  gl_Position = (gl_TessCoord.x * gl_in[0].gl_Position) +
+                (gl_TessCoord.y * gl_in[1].gl_Position) +
+                (gl_TessCoord.z * gl_in[2].gl_Position);
+
+  tes_color = patch_color;
+}
+END
+
+SHADER fragment frag GLSL
+#version 450
+
+layout (location = 0) in vec4 inColor;
+layout (location = 0) out vec4 outColor;
+
+void main(void)
+{
+  outColor = inColor;
+}
+END
+
+BUFFER vertexPositionA DATA_TYPE vec3<float> DATA
+-0.50 -0.50  0.17
+ 0.50 -0.50  0.17
+ 0.50  0.50  0.17
+ 0.50  0.50  0.17
+-0.50  0.50  0.17
+-0.50 -0.50  0.17
+END
+
+BUFFER vertexPositionB DATA_TYPE vec3<float> DATA
+-0.50 -0.50  0.18
+ 0.50 -0.50  0.18
+ 0.50  0.50  0.18
+ 0.50  0.50  0.18
+-0.50  0.50  0.18
+-0.50 -0.50  0.18
+END
+
+BUFFER vertexColorA DATA_TYPE vec4<float> DATA
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+END
+
+BUFFER vertexColorB DATA_TYPE vec4<float> DATA
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+END
+
+BUFFER framebuffer FORMAT R8G8B8A8_UNORM
+IMAGE verifyImage FORMAT R8G8B8A8_UNORM DIM_2D WIDTH 100 HEIGHT 100 FILL 0
+BUFFER depth_buf FORMAT D16_UNORM
+
+PIPELINE graphics pipeline1
+  ATTACH vert
+  ATTACH tesc
+  ATTACH tese
+  ATTACH frag
+
+  POLYGON_MODE point
+  PATCH_CONTROL_POINTS 3
+
+  DEPTH
+    TEST on
+    WRITE on
+    COMPARE_OP less
+    CLAMP off
+    BOUNDS min 0.0 max 1.0
+    BIAS constant 0.0 clamp 0.0 slope 0.0
+  END
+
+  FRAMEBUFFER_SIZE 100 100
+  VERTEX_DATA vertexPositionA LOCATION 0
+  VERTEX_DATA vertexColorA LOCATION 1
+  BIND BUFFER framebuffer AS color LOCATION 0
+  BIND BUFFER depth_buf AS depth_stencil
+END
+
+PIPELINE graphics pipeline2
+  ATTACH vert
+  ATTACH tesc
+  ATTACH tese
+  ATTACH frag
+
+  POLYGON_MODE point
+  PATCH_CONTROL_POINTS 3
+
+  DEPTH
+    TEST on
+    WRITE on
+    COMPARE_OP less
+    CLAMP off
+    BOUNDS min 0.0 max 1.0
+    BIAS constant -700.0 clamp 0.0 slope 0.0
+  END
+
+  FRAMEBUFFER_SIZE 100 100
+  VERTEX_DATA vertexPositionB LOCATION 0
+  VERTEX_DATA vertexColorB LOCATION 1
+  BIND BUFFER framebuffer AS color LOCATION 0
+  BIND BUFFER depth_buf AS depth_stencil
+END
+
+CLEAR_COLOR pipeline1 0 0 0 255
+CLEAR_DEPTH pipeline1 0.3
+CLEAR pipeline1
+
+CLEAR_COLOR pipeline2 0 0 0 255
+
+RUN pipeline1 DRAW_ARRAY AS PATCH_LIST START_IDX 0 COUNT 6
+RUN pipeline2 DRAW_ARRAY AS PATCH_LIST START_IDX 0 COUNT 6
+
+# ---------------- VERIFY PIPELINE ------------------
+# This pipeline verifies the frame buffer contents.
+# The compute shader writes color green if the value is expected,
+# otherwise red.
+
+SHADER compute comp_shader GLSL
+#version 450
+
+layout(local_size_x=10,local_size_y=10) in;
+uniform layout(set=0, binding=0, rgba8) image2D resultImage;
+uniform layout(set=0, binding=1, rgba8) image2D verifyImage;
+
+void main()
+{
+  ivec2 uv = ivec2(gl_GlobalInvocationID.xy);
+  vec4 color = imageLoad(resultImage, uv);
+
+  if(color.r == 0.0 && color.a == 1.0) imageStore(verifyImage, uv, vec4(0.0, 1.0, 0.0, 1.0));
+  else imageStore(verifyImage, uv, vec4(1.0, 0.0, 0.0, 1.0));
+}
+END
+
+PIPELINE compute verify_pipeline
+  ATTACH comp_shader
+
+  FRAMEBUFFER_SIZE 100 100
+  BIND BUFFER framebuffer AS storage_image DESCRIPTOR_SET 0 BINDING 0
+  BIND BUFFER verifyImage AS storage_image DESCRIPTOR_SET 0 BINDING 1
+END
+
+RUN verify_pipeline 10 10 1
+
+EXPECT verifyImage IDX 0 0 SIZE 100 100 EQ_RGBA   0 255   0 255
\ No newline at end of file
diff --git a/external/vulkancts/data/vulkan/amber/draw/depth_bias/depth_bias_triangle_list_fill.amber b/external/vulkancts/data/vulkan/amber/draw/depth_bias/depth_bias_triangle_list_fill.amber
new file mode 100644
index 0000000..b51ae5d
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/draw/depth_bias/depth_bias_triangle_list_fill.amber
@@ -0,0 +1,179 @@
+#!amber
+# Copyright 2021 Google LLC.
+# Copyright 2021 The Khronos Group Inc.
+#
+# 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.
+#
+# Red rect. fragDepth:    0.17
+# Green rect. fragDepth:  0.18
+# Depth color format:     D16_UNORM
+# Depth bias:             -0.01068115234375 (-700.0 / 2^16)
+# Draw method:            Triangle List
+# Polygon Mode:           Fill
+# Result:                 Green rectangle should be on top.
+
+SHADER vertex vert_shader GLSL
+#version 450
+
+layout (location = 0) in vec3 inPosition;
+layout (location = 1) in vec4 inColor;
+
+layout (location = 0) out vec4 outColor;
+
+void main()
+{
+  gl_Position = vec4(inPosition, 1.0);
+  outColor = inColor;
+}
+END
+
+SHADER fragment frag_shader GLSL
+#version 450
+
+layout (location = 0) in vec4 inColor;
+layout (location = 0) out vec4 outColor;
+
+void main()
+{
+  outColor = inColor;
+}
+END
+
+BUFFER framebuffer FORMAT R8G8B8A8_UNORM
+IMAGE verifyImage FORMAT R8G8B8A8_UNORM DIM_2D WIDTH 100 HEIGHT 100 FILL 0
+BUFFER depth_buf FORMAT D16_UNORM
+
+BUFFER vertexPositionA DATA_TYPE vec3<float> DATA
+-0.50 -0.50  0.17
+ 0.50 -0.50  0.17
+ 0.50  0.50  0.17
+ 0.50  0.50  0.17
+-0.50  0.50  0.17
+-0.50 -0.50  0.17
+END
+
+BUFFER vertexPositionB DATA_TYPE vec3<float> DATA
+-0.50 -0.50  0.18
+ 0.50 -0.50  0.18
+ 0.50  0.50  0.18
+ 0.50  0.50  0.18
+-0.50  0.50  0.18
+-0.50 -0.50  0.18
+END
+
+BUFFER vertexColorA DATA_TYPE vec4<float> DATA
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+END
+
+BUFFER vertexColorB DATA_TYPE vec4<float> DATA
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+END
+
+PIPELINE graphics pipeline1
+  ATTACH vert_shader
+  ATTACH frag_shader
+
+  POLYGON_MODE fill
+
+  DEPTH
+    TEST on
+    WRITE on
+    COMPARE_OP less
+    CLAMP off
+    BOUNDS min 0.0 max 1.0
+    BIAS constant 0.0 clamp 0.0 slope 0.0
+  END
+
+  FRAMEBUFFER_SIZE 100 100
+  VIEWPORT 0.0 0.0 SIZE 100.0 100.0
+  VERTEX_DATA vertexPositionA LOCATION 0
+  VERTEX_DATA vertexColorA LOCATION 1
+  BIND BUFFER framebuffer AS color LOCATION 0
+  BIND BUFFER depth_buf AS depth_stencil
+END
+
+PIPELINE graphics pipeline2
+  ATTACH vert_shader
+  ATTACH frag_shader
+
+  POLYGON_MODE fill
+
+  DEPTH
+    TEST on
+    WRITE on
+    COMPARE_OP less
+    CLAMP off
+    BOUNDS min 0.0 max 1.0
+    BIAS constant -700.0 clamp 0.0 slope 0.0
+  END
+
+  FRAMEBUFFER_SIZE 100 100
+  VIEWPORT 0.0 0.0 SIZE 100.0 100.0
+  VERTEX_DATA vertexPositionB LOCATION 0
+  VERTEX_DATA vertexColorB LOCATION 1
+  BIND BUFFER framebuffer AS color LOCATION 0
+  BIND BUFFER depth_buf AS depth_stencil
+END
+
+CLEAR_COLOR pipeline1 0 0 0 255
+CLEAR_DEPTH pipeline1 0.3
+CLEAR pipeline1
+
+CLEAR_COLOR pipeline2 0 0 0 255
+
+RUN pipeline1 DRAW_ARRAY AS TRIANGLE_LIST START_IDX 0 COUNT 6
+RUN pipeline2 DRAW_ARRAY AS TRIANGLE_LIST START_IDX 0 COUNT 6
+
+# ---------------- VERIFY PIPELINE ------------------
+# This pipeline verifies the frame buffer contents.
+# The compute shader writes color green if the value is expected,
+# otherwise red.
+
+SHADER compute comp_shader GLSL
+#version 450
+
+layout(local_size_x=10,local_size_y=10) in;
+uniform layout(set=0, binding=0, rgba8) image2D resultImage;
+uniform layout(set=0, binding=1, rgba8) image2D verifyImage;
+
+void main()
+{
+  ivec2 uv = ivec2(gl_GlobalInvocationID.xy);
+  vec4 color = imageLoad(resultImage, uv);
+
+  if(color.r == 0.0 && color.a == 1.0) imageStore(verifyImage, uv, vec4(0.0, 1.0, 0.0, 1.0));
+  else imageStore(verifyImage, uv, vec4(1.0, 0.0, 0.0, 1.0));
+}
+END
+
+PIPELINE compute verify_pipeline
+  ATTACH comp_shader
+
+  FRAMEBUFFER_SIZE 100 100
+  BIND BUFFER framebuffer AS storage_image DESCRIPTOR_SET 0 BINDING 0
+  BIND BUFFER verifyImage AS storage_image DESCRIPTOR_SET 0 BINDING 1
+END
+
+RUN verify_pipeline 10 10 1
+
+EXPECT verifyImage IDX 0 0 SIZE 100 100 EQ_RGBA   0 255   0 255
\ No newline at end of file
diff --git a/external/vulkancts/data/vulkan/amber/draw/depth_bias/depth_bias_triangle_list_line.amber b/external/vulkancts/data/vulkan/amber/draw/depth_bias/depth_bias_triangle_list_line.amber
new file mode 100644
index 0000000..6d3195a
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/draw/depth_bias/depth_bias_triangle_list_line.amber
@@ -0,0 +1,181 @@
+#!amber
+# Copyright 2021 Google LLC.
+# Copyright 2021 The Khronos Group Inc.
+#
+# 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.
+#
+# Red rect. fragDepth:    0.17
+# Green rect. fragDepth:  0.18
+# Depth color format:     D16_UNORM
+# Depth bias:             -0.01068115234375 (-700.0 / 2^16)
+# Draw method:            Triangle List
+# Polygon Mode:           Line
+# Result:                 Green rectangle should be on top.
+
+DEVICE_FEATURE fillModeNonSolid
+
+SHADER vertex vert_shader GLSL
+#version 450
+
+layout (location = 0) in vec3 inPosition;
+layout (location = 1) in vec4 inColor;
+
+layout (location = 0) out vec4 outColor;
+
+void main()
+{
+  gl_Position = vec4(inPosition, 1.0);
+  outColor = inColor;
+}
+END
+
+SHADER fragment frag_shader GLSL
+#version 450
+
+layout (location = 0) in vec4 inColor;
+layout (location = 0) out vec4 outColor;
+
+void main()
+{
+  outColor = inColor;
+}
+END
+
+BUFFER framebuffer FORMAT R8G8B8A8_UNORM
+IMAGE verifyImage FORMAT R8G8B8A8_UNORM DIM_2D WIDTH 100 HEIGHT 100 FILL 0
+BUFFER depth_buf FORMAT D16_UNORM
+
+BUFFER vertexPositionA DATA_TYPE vec3<float> DATA
+-0.50 -0.50  0.17
+ 0.50 -0.50  0.17
+ 0.50  0.50  0.17
+ 0.50  0.50  0.17
+-0.50  0.50  0.17
+-0.50 -0.50  0.17
+END
+
+BUFFER vertexPositionB DATA_TYPE vec3<float> DATA
+-0.50 -0.50  0.18
+ 0.50 -0.50  0.18
+ 0.50  0.50  0.18
+ 0.50  0.50  0.18
+-0.50  0.50  0.18
+-0.50 -0.50  0.18
+END
+
+BUFFER vertexColorA DATA_TYPE vec4<float> DATA
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+END
+
+BUFFER vertexColorB DATA_TYPE vec4<float> DATA
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+END
+
+PIPELINE graphics pipeline1
+  ATTACH vert_shader
+  ATTACH frag_shader
+
+  POLYGON_MODE line
+
+  DEPTH
+    TEST on
+    WRITE on
+    COMPARE_OP less
+    CLAMP off
+    BOUNDS min 0.0 max 1.0
+    BIAS constant 0.0 clamp 0.0 slope 0.0
+  END
+
+  FRAMEBUFFER_SIZE 100 100
+  VIEWPORT 0.0 0.0 SIZE 100.0 100.0
+  VERTEX_DATA vertexPositionA LOCATION 0
+  VERTEX_DATA vertexColorA LOCATION 1
+  BIND BUFFER framebuffer AS color LOCATION 0
+  BIND BUFFER depth_buf AS depth_stencil
+END
+
+PIPELINE graphics pipeline2
+  ATTACH vert_shader
+  ATTACH frag_shader
+
+  POLYGON_MODE line
+
+  DEPTH
+    TEST on
+    WRITE on
+    COMPARE_OP less
+    CLAMP off
+    BOUNDS min 0.0 max 1.0
+    BIAS constant -700.0 clamp 0.0 slope 0.0
+  END
+
+  FRAMEBUFFER_SIZE 100 100
+  VIEWPORT 0.0 0.0 SIZE 100.0 100.0
+  VERTEX_DATA vertexPositionB LOCATION 0
+  VERTEX_DATA vertexColorB LOCATION 1
+  BIND BUFFER framebuffer AS color LOCATION 0
+  BIND BUFFER depth_buf AS depth_stencil
+END
+
+CLEAR_COLOR pipeline1 0 0 0 255
+CLEAR_DEPTH pipeline1 0.3
+CLEAR pipeline1
+
+CLEAR_COLOR pipeline2 0 0 0 255
+
+RUN pipeline1 DRAW_ARRAY AS TRIANGLE_LIST START_IDX 0 COUNT 6
+RUN pipeline2 DRAW_ARRAY AS TRIANGLE_LIST START_IDX 0 COUNT 6
+
+# ---------------- VERIFY PIPELINE ------------------
+# This pipeline verifies the frame buffer contents.
+# The compute shader writes color green if the value is expected,
+# otherwise red.
+
+SHADER compute comp_shader GLSL
+#version 450
+
+layout(local_size_x=10,local_size_y=10) in;
+uniform layout(set=0, binding=0, rgba8) image2D resultImage;
+uniform layout(set=0, binding=1, rgba8) image2D verifyImage;
+
+void main()
+{
+  ivec2 uv = ivec2(gl_GlobalInvocationID.xy);
+  vec4 color = imageLoad(resultImage, uv);
+
+  if(color.r == 0.0 && color.a == 1.0) imageStore(verifyImage, uv, vec4(0.0, 1.0, 0.0, 1.0));
+  else imageStore(verifyImage, uv, vec4(1.0, 0.0, 0.0, 1.0));
+}
+END
+
+PIPELINE compute verify_pipeline
+  ATTACH comp_shader
+
+  FRAMEBUFFER_SIZE 100 100
+  BIND BUFFER framebuffer AS storage_image DESCRIPTOR_SET 0 BINDING 0
+  BIND BUFFER verifyImage AS storage_image DESCRIPTOR_SET 0 BINDING 1
+END
+
+RUN verify_pipeline 10 10 1
+
+EXPECT verifyImage IDX 0 0 SIZE 100 100 EQ_RGBA   0 255   0 255
\ No newline at end of file
diff --git a/external/vulkancts/data/vulkan/amber/draw/depth_bias/depth_bias_triangle_list_point.amber b/external/vulkancts/data/vulkan/amber/draw/depth_bias/depth_bias_triangle_list_point.amber
new file mode 100644
index 0000000..61d6baf
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/draw/depth_bias/depth_bias_triangle_list_point.amber
@@ -0,0 +1,181 @@
+#!amber
+# Copyright 2021 Google LLC.
+# Copyright 2021 The Khronos Group Inc.
+#
+# 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.
+#
+# Red rect. fragDepth:    0.17
+# Green rect. fragDepth:  0.18
+# Depth color format:     D16_UNORM
+# Depth bias:             -0.01068115234375 (-700.0 / 2^16)
+# Draw method:            Triangle List
+# Polygon Mode:           Point
+# Result:                 Green rectangle should be on top.
+
+DEVICE_FEATURE fillModeNonSolid
+
+SHADER vertex vert_shader GLSL
+#version 450
+
+layout (location = 0) in vec3 inPosition;
+layout (location = 1) in vec4 inColor;
+
+layout (location = 0) out vec4 outColor;
+
+void main()
+{
+  gl_Position = vec4(inPosition, 1.0);
+  outColor = inColor;
+}
+END
+
+SHADER fragment frag_shader GLSL
+#version 450
+
+layout (location = 0) in vec4 inColor;
+layout (location = 0) out vec4 outColor;
+
+void main()
+{
+  outColor = inColor;
+}
+END
+
+BUFFER framebuffer FORMAT R8G8B8A8_UNORM
+IMAGE verifyImage FORMAT R8G8B8A8_UNORM DIM_2D WIDTH 100 HEIGHT 100 FILL 0
+BUFFER depth_buf FORMAT D16_UNORM
+
+BUFFER vertexPositionA DATA_TYPE vec3<float> DATA
+-0.50 -0.50  0.17
+ 0.50 -0.50  0.17
+ 0.50  0.50  0.17
+ 0.50  0.50  0.17
+-0.50  0.50  0.17
+-0.50 -0.50  0.17
+END
+
+BUFFER vertexPositionB DATA_TYPE vec3<float> DATA
+-0.50 -0.50  0.18
+ 0.50 -0.50  0.18
+ 0.50  0.50  0.18
+ 0.50  0.50  0.18
+-0.50  0.50  0.18
+-0.50 -0.50  0.18
+END
+
+BUFFER vertexColorA DATA_TYPE vec4<float> DATA
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+1.0 0.0 0.0 1.0
+END
+
+BUFFER vertexColorB DATA_TYPE vec4<float> DATA
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+0.0 1.0 0.0 1.0
+END
+
+PIPELINE graphics pipeline1
+  ATTACH vert_shader
+  ATTACH frag_shader
+
+  POLYGON_MODE point
+
+  DEPTH
+    TEST on
+    WRITE on
+    COMPARE_OP less
+    CLAMP off
+    BOUNDS min 0.0 max 1.0
+    BIAS constant 0.0 clamp 0.0 slope 0.0
+  END
+
+  FRAMEBUFFER_SIZE 100 100
+  VIEWPORT 0.0 0.0 SIZE 100.0 100.0
+  VERTEX_DATA vertexPositionA LOCATION 0
+  VERTEX_DATA vertexColorA LOCATION 1
+  BIND BUFFER framebuffer AS color LOCATION 0
+  BIND BUFFER depth_buf AS depth_stencil
+END
+
+PIPELINE graphics pipeline2
+  ATTACH vert_shader
+  ATTACH frag_shader
+
+  POLYGON_MODE point
+
+  DEPTH
+    TEST on
+    WRITE on
+    COMPARE_OP less
+    CLAMP off
+    BOUNDS min 0.0 max 1.0
+    BIAS constant -700.0 clamp 0.0 slope 0.0
+  END
+
+  FRAMEBUFFER_SIZE 100 100
+  VIEWPORT 0.0 0.0 SIZE 100.0 100.0
+  VERTEX_DATA vertexPositionB LOCATION 0
+  VERTEX_DATA vertexColorB LOCATION 1
+  BIND BUFFER framebuffer AS color LOCATION 0
+  BIND BUFFER depth_buf AS depth_stencil
+END
+
+CLEAR_COLOR pipeline1 0 0 0 255
+CLEAR_DEPTH pipeline1 0.3
+CLEAR pipeline1
+
+CLEAR_COLOR pipeline2 0 0 0 255
+
+RUN pipeline1 DRAW_ARRAY AS TRIANGLE_LIST START_IDX 0 COUNT 6
+RUN pipeline2 DRAW_ARRAY AS TRIANGLE_LIST START_IDX 0 COUNT 6
+
+# ---------------- VERIFY PIPELINE ------------------
+# This pipeline verifies the frame buffer contents.
+# The compute shader writes color green if the value is expected,
+# otherwise red.
+
+SHADER compute comp_shader GLSL
+#version 450
+
+layout(local_size_x=10,local_size_y=10) in;
+uniform layout(set=0, binding=0, rgba8) image2D resultImage;
+uniform layout(set=0, binding=1, rgba8) image2D verifyImage;
+
+void main()
+{
+  ivec2 uv = ivec2(gl_GlobalInvocationID.xy);
+  vec4 color = imageLoad(resultImage, uv);
+
+  if(color.r == 0.0 && color.a == 1.0) imageStore(verifyImage, uv, vec4(0.0, 1.0, 0.0, 1.0));
+  else imageStore(verifyImage, uv, vec4(1.0, 0.0, 0.0, 1.0));
+}
+END
+
+PIPELINE compute verify_pipeline
+  ATTACH comp_shader
+
+  FRAMEBUFFER_SIZE 100 100
+  BIND BUFFER framebuffer AS storage_image DESCRIPTOR_SET 0 BINDING 0
+  BIND BUFFER verifyImage AS storage_image DESCRIPTOR_SET 0 BINDING 1
+END
+
+RUN verify_pipeline 10 10 1
+
+EXPECT verifyImage IDX 0 0 SIZE 100 100 EQ_RGBA   0 255   0 255
\ No newline at end of file
diff --git a/external/vulkancts/modules/vulkan/amber/vktAmberTestCase.cpp b/external/vulkancts/modules/vulkan/amber/vktAmberTestCase.cpp
index 0fd4a54..9e00911 100644
--- a/external/vulkancts/modules/vulkan/amber/vktAmberTestCase.cpp
+++ b/external/vulkancts/modules/vulkan/amber/vktAmberTestCase.cpp
@@ -91,6 +91,8 @@
 		return ctx.getDeviceFeatures().shaderInt64;
 	if (feature == "Features.tessellationShader")
 		return ctx.getDeviceFeatures().tessellationShader;
+	if (feature == "Features.shaderTessellationAndGeometryPointSize")
+		return ctx.getDeviceFeatures().shaderTessellationAndGeometryPointSize;
 	if (feature == "Features.geometryShader")
 		return ctx.getDeviceFeatures().geometryShader;
 	if (feature == "Features.fragmentStoresAndAtomics")
diff --git a/external/vulkancts/modules/vulkan/draw/CMakeLists.txt b/external/vulkancts/modules/vulkan/draw/CMakeLists.txt
index 877b0fd..6aedceb 100644
--- a/external/vulkancts/modules/vulkan/draw/CMakeLists.txt
+++ b/external/vulkancts/modules/vulkan/draw/CMakeLists.txt
@@ -51,6 +51,8 @@
 	vktDrawExplicitVertexParameterTests.hpp
 	vktDrawOutputLocationTests.cpp
 	vktDrawOutputLocationTests.hpp
+	vktDrawDepthBiasTests.cpp
+	vktDrawDepthBiasTests.hpp
 	vktDrawDepthClampTests.cpp
 	vktDrawDepthClampTests.hpp
 	vktDrawAhbTests.cpp
diff --git a/external/vulkancts/modules/vulkan/draw/vktDrawDepthBiasTests.cpp b/external/vulkancts/modules/vulkan/draw/vktDrawDepthBiasTests.cpp
new file mode 100644
index 0000000..430969b
--- /dev/null
+++ b/external/vulkancts/modules/vulkan/draw/vktDrawDepthBiasTests.cpp
@@ -0,0 +1,78 @@
+/*------------------------------------------------------------------------
+ * Vulkan Conformance Tests
+ * ------------------------
+ *
+ * Copyright (c) 2021-2022 Google Inc.
+ * Copyright (c) 2021-2022 The Khronos Group Inc.
+ *
+ * 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.
+ *
+ *//*!
+ * \file
+ * \brief Depth bias tests
+ *//*--------------------------------------------------------------------*/
+
+#include "vktDrawDepthBiasTests.hpp"
+#include "vktTestGroupUtil.hpp"
+#include "amber/vktAmberTestCase.hpp"
+
+#include "tcuTestCase.hpp"
+
+#include <string>
+
+namespace vkt
+{
+namespace Draw
+{
+namespace
+{
+
+void createTests (tcu::TestCaseGroup* testGroup)
+{
+	tcu::TestContext&			testCtx		= testGroup->getTestContext();
+	static const char			dataDir[]	= "draw/depth_bias";
+
+	struct depthBiasCase
+	{
+		std::string					testName;
+		std::vector<std::string>	testRequirements;
+	};
+
+	static const depthBiasCase	cases[] =
+	{
+		{ "depth_bias_triangle_list_fill",		{} },
+		{ "depth_bias_triangle_list_line",		{ "Features.fillModeNonSolid" } },
+		{ "depth_bias_triangle_list_point",		{ "Features.fillModeNonSolid" } },
+		{ "depth_bias_patch_list_tri_fill",		{ "Features.tessellationShader" } },
+		{ "depth_bias_patch_list_tri_line",		{ "Features.tessellationShader", "Features.fillModeNonSolid" } },
+		{ "depth_bias_patch_list_tri_point",	{ "Features.tessellationShader", "Features.fillModeNonSolid" } }
+	};
+
+	for (int i = 0; i < DE_LENGTH_OF_ARRAY(cases); ++i)
+	{
+		std::vector<std::string>	requirements	= cases[i].testRequirements;
+		const std::string			fileName		= cases[i].testName + ".amber";
+		cts_amber::AmberTestCase*	testCase		= cts_amber::createAmberTestCase(testCtx, cases[i].testName.c_str(), "", dataDir, fileName, requirements);
+		testGroup->addChild(testCase);
+	}
+}
+
+} // anonymous
+
+tcu::TestCaseGroup* createDepthBiasTests (tcu::TestContext& testCtx)
+{
+	return createTestGroup(testCtx, "depth_bias", "Depth bias tests", createTests);
+}
+
+}	// Draw
+}	// vkt
diff --git a/external/vulkancts/modules/vulkan/draw/vktDrawDepthBiasTests.hpp b/external/vulkancts/modules/vulkan/draw/vktDrawDepthBiasTests.hpp
new file mode 100644
index 0000000..e3fe0fb
--- /dev/null
+++ b/external/vulkancts/modules/vulkan/draw/vktDrawDepthBiasTests.hpp
@@ -0,0 +1,40 @@
+#ifndef _VKTDRAWDEPTHBIASTESTS_HPP
+#define _VKTDRAWDEPTHBIASTESTS_HPP
+/*------------------------------------------------------------------------
+ * Vulkan Conformance Tests
+ * ------------------------
+ *
+ * Copyright (c) 2021-2022 Google Inc.
+ * Copyright (c) 2021-2022 The Khronos Group Inc.
+ *
+ * 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.
+ *
+ *//*!
+ * \file
+ * \brief Depth bias tests
+ *//*--------------------------------------------------------------------*/
+
+#include "vkDefs.hpp"
+#include "vktTestCase.hpp"
+
+namespace vkt
+{
+namespace Draw
+{
+
+tcu::TestCaseGroup* createDepthBiasTests (tcu::TestContext& testCtx);
+
+} // Draw
+} // vkt
+
+#endif // _VKTDRAWDEPTHBIASTESTS_HPP
diff --git a/external/vulkancts/modules/vulkan/draw/vktDrawTests.cpp b/external/vulkancts/modules/vulkan/draw/vktDrawTests.cpp
index 5160153..0c78d8c 100644
--- a/external/vulkancts/modules/vulkan/draw/vktDrawTests.cpp
+++ b/external/vulkancts/modules/vulkan/draw/vktDrawTests.cpp
@@ -42,6 +42,7 @@
 #include "vktDrawDiscardRectanglesTests.hpp"
 #include "vktDrawExplicitVertexParameterTests.hpp"
 #include "vktDrawOutputLocationTests.hpp"
+#include "vktDrawDepthBiasTests.hpp"
 #include "vktDrawDepthClampTests.hpp"
 #include "vktDrawAhbTests.hpp"
 #include "vktDrawMultipleClearsWithinRenderPass.hpp"
@@ -81,6 +82,7 @@
 	if (!useDynamicRendering)
 	{
 		// amber tests - no support for dynamic rendering
+		group->addChild(createDepthBiasTests				(testCtx));
 		group->addChild(createOutputLocationTests			(testCtx));
 
 		// subpasses can't be translated to dynamic rendering
diff --git a/external/vulkancts/mustpass/main/vk-default/draw.txt b/external/vulkancts/mustpass/main/vk-default/draw.txt
index 757fd9f..bbb8270 100644
--- a/external/vulkancts/mustpass/main/vk-default/draw.txt
+++ b/external/vulkancts/mustpass/main/vk-default/draw.txt
@@ -6704,6 +6704,12 @@
 dEQP-VK.draw.renderpass.multi_draw.overlapping.indexed_packed.max_draws.stride_extra_12.1_instance.tess_geom.single_view.offset_6
 dEQP-VK.draw.renderpass.multi_draw.overlapping.indexed_packed.max_draws.stride_extra_12.1_instance.tess_geom.multiview.no_offset
 dEQP-VK.draw.renderpass.multi_draw.overlapping.indexed_packed.max_draws.stride_extra_12.1_instance.tess_geom.multiview.offset_6
+dEQP-VK.draw.renderpass.depth_bias.depth_bias_triangle_list_fill
+dEQP-VK.draw.renderpass.depth_bias.depth_bias_triangle_list_line
+dEQP-VK.draw.renderpass.depth_bias.depth_bias_triangle_list_point
+dEQP-VK.draw.renderpass.depth_bias.depth_bias_patch_list_tri_fill
+dEQP-VK.draw.renderpass.depth_bias.depth_bias_patch_list_tri_line
+dEQP-VK.draw.renderpass.depth_bias.depth_bias_patch_list_tri_point
 dEQP-VK.draw.renderpass.output_location.array.b10g11r11-ufloat-pack32-highp
 dEQP-VK.draw.renderpass.output_location.array.b10g11r11-ufloat-pack32-highp-output-float
 dEQP-VK.draw.renderpass.output_location.array.b10g11r11-ufloat-pack32-highp-output-vec2