From 288da7c8dbea52ed4312885f0be9ffec27e307e8 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 6 Dec 2022 13:29:18 +0100 Subject: [PATCH] opengl32: Fix GLdouble type alignment on the Unix side. --- dlls/glu32/project.c | 10 +++++----- dlls/opengl32/make_opengl | 1 + include/wine/wgl.h | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/glu32/project.c b/dlls/glu32/project.c index 0a71eabd98c..2533ba28f42 100644 --- a/dlls/glu32/project.c +++ b/dlls/glu32/project.c @@ -241,8 +241,8 @@ GLint WINAPI gluProject( GLdouble objx, GLdouble objy, GLdouble objz, const GLdo const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *winx, GLdouble *winy, GLdouble *winz ) { - double in[4]; - double out[4]; + GLdouble in[4]; + GLdouble out[4]; in[0]=objx; in[1]=objy; @@ -276,9 +276,9 @@ GLint WINAPI gluUnProject( GLdouble winx, GLdouble winy, GLdouble winz, const GL const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *objx, GLdouble *objy, GLdouble *objz ) { - double finalMatrix[16]; - double in[4]; - double out[4]; + GLdouble finalMatrix[16]; + GLdouble in[4]; + GLdouble out[4]; __gluMultMatricesd(modelMatrix, projMatrix, finalMatrix); if (!__gluInvertMatrixd(finalMatrix, finalMatrix)) return(GL_FALSE); diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index 5564b4b8526..4f93725bb29 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -133,6 +133,7 @@ my %remap_types = my %khronos_types = ( + "double" => "double DECLSPEC_ALIGN(8)", "khronos_int8_t" => "signed char", "khronos_uint8_t" => "unsigned char", "khronos_int16_t" => "short", diff --git a/include/wine/wgl.h b/include/wine/wgl.h index 51b821f5594..b3f93fab9ca 100644 --- a/include/wine/wgl.h +++ b/include/wine/wgl.h @@ -21,8 +21,8 @@ typedef int GLclampx; typedef int GLsizei; typedef float GLfloat; typedef float GLclampf; -typedef double GLdouble; -typedef double GLclampd; +typedef double DECLSPEC_ALIGN(8) GLdouble; +typedef double DECLSPEC_ALIGN(8) GLclampd; typedef void *GLeglClientBufferEXT; typedef void *GLeglImageOES; typedef char GLchar;