The series looks good to me. Reviewed-by: Charmaine Lee <[email protected]>
________________________________________ From: Piglit <[email protected]> on behalf of Brian Paul <[email protected]> Sent: Wednesday, June 25, 2014 10:50 AM To: [email protected] Subject: [Piglit] [PATCH 1/2] piglit-dispatch: fix get_core_proc_address() for Windows Even for functions such as glGetStringi() which are in OpenGL 3.0, we call get_core_proc_address() with gl_10x_version = 10 (seems to be a larger problem in the dispatch code generation). That means we try GetProcAddress("OPENGL32.DLL") and fail. Now, if GetProcAddress() fails, try get_ext_proc_address() too. --- tests/util/piglit-dispatch-init.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/util/piglit-dispatch-init.c b/tests/util/piglit-dispatch-init.c index 22318a3..456f75b 100644 --- a/tests/util/piglit-dispatch-init.c +++ b/tests/util/piglit-dispatch-init.c @@ -94,8 +94,16 @@ get_core_proc_address(const char *function_name, int gl_10x_version) if (gl_10x_version > 11) { return get_ext_proc_address(function_name); } else { - return (piglit_dispatch_function_ptr) + piglit_dispatch_function_ptr p; + /* Try GetProcAddress() first. + * If that fails, try wglGetProcAddress(). + */ + p = (piglit_dispatch_function_ptr) GetProcAddress(LoadLibraryA("OPENGL32"), function_name); + if (!p) + p = get_ext_proc_address(function_name); + return p; + } } -- 1.7.10.4 _______________________________________________ Piglit mailing list [email protected] https://urldefense.proofpoint.com/v1/url?u=http://lists.freedesktop.org/mailman/listinfo/piglit&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=iVNYIcCaC9TDvyNBQU%2F5q5NVsC01tSgJb3oX27T14ck%3D%0A&m=WuH7te4OnJ33iLNMMaAsJqSOS%2B%2FtaszEa1loLlQjzSw%3D%0A&s=26be3d16253ff76835209a6c3dceb1f55a4d4e67b16e31ad1581651d80220bd0 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
