Support frustum clipping against z = -1.
This allows performing the depth range adjustment only once as part of the
viewport transform and not have it be affected by transform feedback.
Change-Id: I89fba3b131c234bea064b1b65f50b62261f4c307
Reviewed-on: https://swiftshader-review.googlesource.com/5421
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/Shader/SetupRoutine.cpp b/src/Shader/SetupRoutine.cpp
index ab7176b..cc29156 100644
--- a/src/Shader/SetupRoutine.cpp
+++ b/src/Shader/SetupRoutine.cpp
@@ -302,13 +302,9 @@
conditionalRotate2(wMax == w2, v0, v1, v2);
}
- Float4 p0 = *Pointer<Float4>(v0 + pos * 16, 16);
- Float4 p1 = *Pointer<Float4>(v1 + pos * 16, 16);
- Float4 p2 = *Pointer<Float4>(v2 + pos * 16, 16);
-
- Float w0 = p0.w;
- Float w1 = p1.w;
- Float w2 = p2.w;
+ Float w0 = *Pointer<Float>(v0 + pos * 16 + 12);
+ Float w1 = *Pointer<Float>(v1 + pos * 16 + 12);
+ Float w2 = *Pointer<Float>(v2 + pos * 16 + 12);
Float4 w012;