summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/g3dvl/tests/test_surface.c
blob: 4d1946396afb2ed298ab11673f9663c0f9d9f4dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <vl_context.h>
#include <vl_surface.h>
#include <xsp_winsys.h>

int main(int argc, char **argv)
{
	const unsigned int	video_width = 32, video_height = 32;
	
	Display			*display;
	struct pipe_context	*pipe;
	struct VL_CONTEXT	*ctx;
	struct VL_SURFACE	*sfc;
	
	display = XOpenDisplay(NULL);
	pipe = create_pipe_context(display);
	
	vlCreateContext(display, pipe, video_width, video_height, VL_FORMAT_YCBCR_420, &ctx);
	vlCreateSurface(ctx, &sfc);
	vlDestroySurface(sfc);
	vlDestroyContext(ctx);
	
	XCloseDisplay(display);
	
	return 0;
}