summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/drm/intel/gem/intel_be_api.c
blob: dd5f814da3c765b3945bfa4f7e704dc86413fa9a (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

#include "intel_be_api.h"
#include "i915simple/i915_winsys.h"
#include "identity/id_drm.h"
#include "trace/tr_drm.h"

static void destroy(struct drm_api *api)
{

}

struct drm_api intel_be_drm_api =
{
	/* intel_be_context.c */
	.create_context = intel_be_create_context,
	/* intel_be_device.c */
	.create_screen = intel_be_create_screen,
	.buffer_from_texture = intel_be_get_texture_buffer,
	.buffer_from_handle = intel_be_buffer_from_handle,
	.handle_from_buffer = intel_be_handle_from_buffer,
	.global_handle_from_buffer = intel_be_global_handle_from_buffer,
	.destroy = destroy,
};

struct drm_api *
drm_api_create()
{
#ifdef DEBUG
#if 0
	return identity_drm_create(&intel_be_drm_api);
#else
	return trace_drm_create(&intel_be_drm_api);
#endif
#else
	return &intel_be_drm_api;
#endif
}