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/src/common/utilities.cpp b/src/common/utilities.cpp
index bef61ae..2f632cf 100644
--- a/src/common/utilities.cpp
+++ b/src/common/utilities.cpp
@@ -591,6 +591,21 @@
return false;
}
+bool IsLineMode(PrimitiveMode primitiveMode)
+{
+ switch (primitiveMode)
+ {
+ case PrimitiveMode::LineLoop:
+ case PrimitiveMode::LineStrip:
+ case PrimitiveMode::LineStripAdjacency:
+ case PrimitiveMode::Lines:
+ return true;
+
+ default:
+ return false;
+ }
+}
+
bool IsIntegerFormat(GLenum unsizedFormat)
{
switch (unsizedFormat)