[Piglit] [PATCH] arb_internalformat_query2: add APIENTRY qualifier to fix MSVC build

Jose Fonseca jfonseca at vmware.com
Wed Jul 13 15:40:40 UTC 2016


Reviewed-by: Jose Fonseca <jfonseca at vmware.com>

________________________________________
From: Brian Paul <brianp at vmware.com>
Sent: Wednesday, July 13, 2016 16:01
To: piglit at lists.freedesktop.org
Cc: Charmaine Lee; Neha Bhende; Jose Fonseca; Brian Paul
Subject: [PATCH] arb_internalformat_query2: add APIENTRY qualifier to fix MSVC build

The GetInternalformat() function pointer type must be declared with
APIENTRY because it points to either the glGetInternalformativ() or
glGetInternalformati64v() GL entrypoint.  Fixes a runtime crash.
---
 tests/spec/arb_internalformat_query2/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/spec/arb_internalformat_query2/common.c b/tests/spec/arb_internalformat_query2/common.c
index 1d60abb..3454ed0 100644
--- a/tests/spec/arb_internalformat_query2/common.c
+++ b/tests/spec/arb_internalformat_query2/common.c
@@ -26,7 +26,7 @@

 /* Generic callback type, doing a cast of params to void*, to avoid
  * having two paths (32 and 64) for each check */
-typedef void (*GetInternalformat)(GLenum target, GLenum internalformat,
+typedef void (APIENTRY *GetInternalformat)(GLenum target, GLenum internalformat,
                                   GLenum pname, GLsizei bufsize,
                                   void *params);

--
1.9.1



More information about the Piglit mailing list