summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/g3dvl/vl_surface.h
blob: 133e1515ef3eb00ef6cf1f6ce34353817af72681 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#ifndef vl_surface_h
#define vl_surface_h

#include "vl_types.h"

#ifdef VL_INTERNAL
struct pipe_texture;

struct vlSurface
{
	struct vlScreen			*screen;
	struct vlContext		*context;
	unsigned int			width;
	unsigned int			height;
	enum vlFormat			format;
	struct pipe_texture		*texture;
	struct pipe_fence_handle	*render_fence;
	struct pipe_fence_handle	*disp_fence;
};
#endif

int vlCreateSurface
(
	struct vlScreen *screen,
	unsigned int width,
	unsigned int height,
	enum vlFormat format,
	struct vlSurface **surface
);

int vlDestroySurface
(
	struct vlSurface *surface
);

int vlRenderMacroBlocksMpeg2
(
	struct vlMpeg2MacroBlockBatch *batch,
	struct vlSurface *surface
);

int vlPutPicture
(
	struct vlSurface *surface,
	vlNativeDrawable drawable,
	int srcx,
	int srcy,
	int srcw,
	int srch,
	int destx,
	int desty,
	int destw,
	int desth,
	int drawable_w,
	int drawable_h,
	enum vlPictureType picture_type
);

int vlSurfaceGetStatus
(
	struct vlSurface *surface,
	enum vlResourceStatus *status
);

int vlSurfaceFlush
(
	struct vlSurface *surface
);

int vlSurfaceSync
(
	struct vlSurface *surface
);

struct vlScreen* vlSurfaceGetScreen
(
	struct vlSurface *surface
);

struct vlContext* vlBindToContext
(
	struct vlSurface *surface,
	struct vlContext *context
);

#endif