On 12/28/2014 10:21 PM, Tapani Pälli wrote: > > On 12/23/2014 12:35 AM, Ian Romanick wrote: >> How do I make a piglit test that calls an unsupported function? I want >> to verify that calling a function not supported by the context either >> crashes or generates GL_INVALID_OPERATION. All of the piglit_dispatch >> infrastructure seems to put too much padding around things to make this >> possible. >> >> Suggestions? > > One (bit painful) way would be to dlopen and dlsym the function?
#ifdef PIGLIT_USE_WAFFLE
// waffle_get_proc_address is a wrapper for:
// - eglGetProcAddress on EGL
// - glXGetProcAddress on GLX
// - wglGetProcAddress on WGL
// - dlsym on CGL (Mac), because that's how you do things on a Mac
func = waffle_get_proc_address("func_name");
#endif
Of course, on WGL your extension must be sufficiently recent to be
able to use GetProcAddress. And on EGL 1.4, it must really be an
extension function, not a OpenGL ES 3.x function.
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
