Ejemplo n.º 1
0
int
main(int argc, char **argv)
{
	enum piglit_result result = PIGLIT_SKIP;

	/* This test doesn't use the glGetString symbol because using
	 * piglit-dispatch introduces difficulties with this test. Instead we
	 * choose to bypass it with eglGetProcAddress.
	 *
	 * Don't be fooled. The symbol glGetString is not the glGetString
	 * declared in <GL/gl.h> and exposed statically from libGL. It is
	 * instead a function pointer defined by piglit-dispatch that is
	 * resolved by glXGetProcAddress.
	 */
	my_glGetString = (void*) eglGetProcAddress("glGetString");
	my_glGetIntegerv = (void*) eglGetProcAddress("glGetIntegerv");

	fold_results(&result, check_opengl());
	fold_results(&result, check_opengl_es1());
	fold_results(&result, check_opengl_es2());
	fold_results(&result, check_opengl_es3());

	piglit_report_result(result);
	return EXIT_SUCCESS;
}
Ejemplo n.º 2
0
static enum piglit_result
check_opengl_es1(void)
{
	enum piglit_result result = PIGLIT_SKIP;

	if (!EGL_KHR_create_context_setup(EGL_OPENGL_ES_BIT))
		return PIGLIT_SKIP;

	/* Try OpenGL ES1 context versions. */
	fold_results(&result, check_flavor(10, API_GLES1));
	fold_results(&result, check_flavor(11, API_GLES1));
	fold_results(&result, check_flavor(12, API_GLES1));
	fold_results(&result, check_flavor(13, API_GLES1));

	EGL_KHR_create_context_teardown();
	return result;
}
Ejemplo n.º 3
0
static enum piglit_result
check_opengl_es3(void)
{
	enum piglit_result result = PIGLIT_SKIP;

	if (!EGL_KHR_create_context_setup(EGL_OPENGL_ES3_BIT_KHR))
		return PIGLIT_SKIP;

	fold_results(&result, check_flavor(30, API_GLES3));
	fold_results(&result, check_flavor(31, API_GLES3));
	fold_results(&result, check_flavor(32, API_GLES3));
	fold_results(&result, check_flavor(33, API_GLES3));
	fold_results(&result, check_flavor(34, API_GLES3));
	fold_results(&result, check_flavor(35, API_GLES3));
	fold_results(&result, check_flavor(36, API_GLES3));
	fold_results(&result, check_flavor(37, API_GLES3));

	EGL_KHR_create_context_teardown();
	return result;
}
Ejemplo n.º 4
0
static enum piglit_result
check_opengl_es2(void)
{
	enum piglit_result result = PIGLIT_SKIP;

	if (!EGL_KHR_create_context_setup(EGL_OPENGL_ES2_BIT))
		return PIGLIT_SKIP;

	/* Try OpenGL ES2 context versions. */
	fold_results(&result, check_flavor(20, API_GLES2));
	fold_results(&result, check_flavor(21, API_GLES2));
	fold_results(&result, check_flavor(22, API_GLES2));
	fold_results(&result, check_flavor(23, API_GLES2));
	fold_results(&result, check_flavor(24, API_GLES2));
	fold_results(&result, check_flavor(25, API_GLES2));
	fold_results(&result, check_flavor(26, API_GLES2));
	fold_results(&result, check_flavor(27, API_GLES2));

	EGL_KHR_create_context_teardown();
	return result;
}
Ejemplo n.º 5
0
static SV *
call_coderef(SV *code, AV *args)
{
    dSP;
    SV **svp;
    I32 count = (args && args != Nullav) ? av_len(args) : -1;
    I32 i;

    PUSHMARK(SP);
    for (i = 0; i <= count; i++) {
        if ((svp = av_fetch(args, i, FALSE))) {
            XPUSHs(*svp);
        }
    }
    PUTBACK;
    count = call_sv(code, G_ARRAY);
    SPAGAIN;

    return fold_results(count);
}
Ejemplo n.º 6
0
static enum piglit_result
check_opengl(void)
{
	enum piglit_result result = PIGLIT_SKIP;

	if (!EGL_KHR_create_context_setup(EGL_OPENGL_BIT))
		return PIGLIT_SKIP;

	/* Try all valid OpenGL compatibility context versions. */
	fold_results(&result, check_flavor(10, API_GL_COMPAT));
	fold_results(&result, check_flavor(11, API_GL_COMPAT));
	fold_results(&result, check_flavor(12, API_GL_COMPAT));
	fold_results(&result, check_flavor(13, API_GL_COMPAT));
	fold_results(&result, check_flavor(14, API_GL_COMPAT));
	fold_results(&result, check_flavor(15, API_GL_COMPAT));
	fold_results(&result, check_flavor(16, API_GL_COMPAT));
	fold_results(&result, check_flavor(17, API_GL_COMPAT));
	fold_results(&result, check_flavor(20, API_GL_COMPAT));
	fold_results(&result, check_flavor(21, API_GL_COMPAT));
	fold_results(&result, check_flavor(22, API_GL_COMPAT));
	fold_results(&result, check_flavor(23, API_GL_COMPAT));
	fold_results(&result, check_flavor(24, API_GL_COMPAT));
	fold_results(&result, check_flavor(25, API_GL_COMPAT));
	fold_results(&result, check_flavor(26, API_GL_COMPAT));
	fold_results(&result, check_flavor(27, API_GL_COMPAT));
	fold_results(&result, check_flavor(30, API_GL_COMPAT));
	fold_results(&result, check_flavor(31, API_GL_COMPAT));
	fold_results(&result, check_flavor(32, API_GL_COMPAT));
	fold_results(&result, check_flavor(33, API_GL_COMPAT));
	fold_results(&result, check_flavor(34, API_GL_COMPAT));
	fold_results(&result, check_flavor(35, API_GL_COMPAT));
	fold_results(&result, check_flavor(36, API_GL_COMPAT));
	fold_results(&result, check_flavor(37, API_GL_COMPAT));
	fold_results(&result, check_flavor(40, API_GL_COMPAT));
	fold_results(&result, check_flavor(41, API_GL_COMPAT));
	fold_results(&result, check_flavor(42, API_GL_COMPAT));
	fold_results(&result, check_flavor(43, API_GL_COMPAT));
	fold_results(&result, check_flavor(44, API_GL_COMPAT));
	fold_results(&result, check_flavor(45, API_GL_COMPAT));
	fold_results(&result, check_flavor(46, API_GL_COMPAT));
	fold_results(&result, check_flavor(47, API_GL_COMPAT));

	/* Try all valid OpenGL core context versions. */
	fold_results(&result, check_flavor(32, API_GL_CORE));
	fold_results(&result, check_flavor(33, API_GL_CORE));
	fold_results(&result, check_flavor(34, API_GL_CORE));
	fold_results(&result, check_flavor(35, API_GL_CORE));
	fold_results(&result, check_flavor(36, API_GL_CORE));
	fold_results(&result, check_flavor(37, API_GL_CORE));
	fold_results(&result, check_flavor(40, API_GL_CORE));
	fold_results(&result, check_flavor(41, API_GL_CORE));
	fold_results(&result, check_flavor(42, API_GL_CORE));
	fold_results(&result, check_flavor(43, API_GL_CORE));
	fold_results(&result, check_flavor(44, API_GL_CORE));
	fold_results(&result, check_flavor(45, API_GL_CORE));
	fold_results(&result, check_flavor(46, API_GL_CORE));
	fold_results(&result, check_flavor(47, API_GL_CORE));

	EGL_KHR_create_context_teardown();
	return result;
}