Vulkan: Add OpenGL line segment rasterization.
Line rasterization rules are implemented using a shader patch. The
patch does a small test and discards pixels that are outside of the
OpenGL line region.
The feature is disabled on Android until we can determine the root
cause of the test failures.
Bug: angleproject:2598
Change-Id: Ic76c5e40fa3ceff7643e735e66f5a9050240c80b
Reviewed-on: https://chromium-review.googlesource.com/1120153
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
diff --git a/util/shader_utils.cpp b/util/shader_utils.cpp
index 3e0efba..4b41677 100644
--- a/util/shader_utils.cpp
+++ b/util/shader_utils.cpp
@@ -364,6 +364,17 @@
})";
}
+// A shader that fills with 100% opaque green.
+const char *Green()
+{
+ return R"(precision mediump float;
+
+void main()
+{
+ gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+})";
+}
+
// A shader that fills with 100% opaque blue.
const char *Blue()
{