Mesa (staging/20.0): Revert "mesa: check for z=0 in _mesa_Vertex3dv()"

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Mar 5 21:16:30 UTC 2020


Module: Mesa
Branch: staging/20.0
Commit: fd04f6166ebd8fa3bf72e8d031dfd91e80231c6e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fd04f6166ebd8fa3bf72e8d031dfd91e80231c6e

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Thu Feb 27 16:06:47 2020 -0500

Revert "mesa: check for z=0 in _mesa_Vertex3dv()"

This reverts commit f04d7439a0ad6e13ff2912ff824553b6bcf511a4.

It no longer helps performance and the current vbo implementation is
faster anyway.

The app that hit this was a CAD program called Spazio3D. It made pretty
terrible use of the OpenGL API and we sent them some tips for improvements.
I'm assuming they've fixed this by now.

Reviewed-by: Mathias Fröhlich <Mathias.Froehlich at web.de>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4052>
(cherry picked from commit df3891e74a72d275aceba91adc94a9e7dc9aa029)

---

 .pick_status.json            | 2 +-
 src/mesa/main/api_loopback.c | 5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 8ef6f7a7d4e..7d6cdb1dc6f 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -490,7 +490,7 @@
         "description": "Revert \"mesa: check for z=0 in _mesa_Vertex3dv()\"",
         "nominated": true,
         "nomination_type": 2,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "f04d7439a0ad6e13ff2912ff824553b6bcf511a4"
     },
diff --git a/src/mesa/main/api_loopback.c b/src/mesa/main/api_loopback.c
index c03c33ee339..53873eae29e 100644
--- a/src/mesa/main/api_loopback.c
+++ b/src/mesa/main/api_loopback.c
@@ -631,10 +631,7 @@ _mesa_Vertex2sv( const GLshort *v )
 void GLAPIENTRY
 _mesa_Vertex3dv( const GLdouble *v )
 {
-   if (v[2] == 0.0)
-      VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
-   else
-      VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
+   VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
 }
 
 void GLAPIENTRY



More information about the mesa-commit mailing list