OSDN Git Service

mesa: reduce the size of gl_viewport_attrib
authorMarek Olšák <marek.olsak@amd.com>
Thu, 16 Nov 2017 00:46:40 +0000 (01:46 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 13 Feb 2018 00:00:45 +0000 (01:00 +0100)
All drivers convert these to float, so there is no reason to use double.
The piglit test that expects double precision from glGet will be adjusted
not to require it (there is a piglit patch).

gl_context::ViewportArray: 512 -> 384 bytes

Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/drivers/common/meta.h
src/mesa/main/mtypes.h

index 1c35ea3..dbe8a9a 100644 (file)
@@ -158,7 +158,7 @@ struct save_state
 
    /** MESA_META_VIEWPORT */
    GLfloat ViewportX, ViewportY, ViewportW, ViewportH;
-   GLclampd DepthNear, DepthFar;
+   GLclampf DepthNear, DepthFar;
 
    /** MESA_META_CLAMP_FRAGMENT_COLOR */
    GLenum ClampFragmentColor;
index d8cb8f8..a589bd4 100644 (file)
@@ -1407,7 +1407,7 @@ struct gl_viewport_attrib
 {
    GLfloat X, Y;               /**< position */
    GLfloat Width, Height;      /**< size */
-   GLdouble Near, Far;         /**< Depth buffer range */
+   GLfloat Near, Far;          /**< Depth buffer range */
 };