Ejemplo n.º 1
0
bool
piglit_wfl_framework_init(struct piglit_wfl_framework *wfl_fw,
                          const struct piglit_gl_test_config *test_config,
                          int32_t platform,
                          const int32_t partial_config_attrib_list[])
{
	static bool is_waffle_initialized = false;
	static int32_t initialized_platform = 0;

	(void)initialized_platform;

	if (is_waffle_initialized) {
		assert(platform == initialized_platform);
	} else {
		const int32_t attrib_list[] = {
			WAFFLE_PLATFORM, platform,
			0,
		};

		wfl_checked_init(attrib_list);
		is_waffle_initialized = true;
		initialized_platform = platform;
	}

	if (!piglit_gl_framework_init(&wfl_fw->gl_fw, test_config)) {
		piglit_wfl_framework_teardown(wfl_fw);
		return false;
	}

	wfl_fw->platform = platform;
	wfl_fw->display = wfl_checked_display_connect(NULL);
	make_context_current(wfl_fw, test_config, partial_config_attrib_list);

	return true;
}
Ejemplo n.º 2
0
static void
destroy(struct piglit_gl_framework *gl_fw)
{
	struct piglit_wfl_framework *wfl_fw = piglit_wfl_framework(gl_fw);

	if (wfl_fw == NULL)
		return;

	piglit_wfl_framework_teardown(wfl_fw);
	free(wfl_fw);
}
Ejemplo n.º 3
0
void
piglit_winsys_framework_teardown(struct piglit_winsys_framework *winsys_fw)
{
	piglit_wfl_framework_teardown(&winsys_fw->wfl_fw);
}