summaryrefslogtreecommitdiff
path: root/src/gbm/gallium_drm_internal.h
blob: 7f9bc081aebe614540585f6d8d55c057577402be (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

#ifndef _GBM_GALLIUM_DRM_INTERNAL_H_
#define _GBM_GALLIUM_DRM_INTERNAL_H_

#include "pipe/p_state.h"

#include "internal.h"

#include "common.h"
#include "common_drm.h"

struct gbm_gallium_drm_device {
   struct gbm_drm_device base;

   struct pipe_screen *screen;
   void *driver;
};

struct gbm_gallium_drm_bo {
   struct gbm_drm_bo base;

   struct pipe_resource *resource;
};

static inline struct gbm_gallium_drm_device *
gbm_gallium_drm_device(struct gbm_device *gbm)
{
   return (struct gbm_gallium_drm_device *) gbm;
}

static inline struct gbm_gallium_drm_bo *
gbm_gallium_drm_bo(struct gbm_bo *bo)
{
   return (struct gbm_gallium_drm_bo *) bo;
}

#endif