Back to index

libdrm  2.4.37
radeon_bo_int.h
Go to the documentation of this file.
00001 #ifndef RADEON_BO_INT
00002 #define RADEON_BO_INT
00003 
00004 struct radeon_bo_manager {
00005     struct radeon_bo_funcs  *funcs;
00006     int                     fd;
00007 };
00008 
00009 struct radeon_bo_int {
00010     void                        *ptr;
00011     uint32_t                    flags;
00012     uint32_t                    handle;
00013     uint32_t                    size;
00014     /* private members */
00015     uint32_t                    alignment;
00016     uint32_t                    domains;
00017     unsigned                    cref;
00018     struct radeon_bo_manager    *bom;
00019     uint32_t                    space_accounted;
00020     uint32_t                    referenced_in_cs;
00021 };
00022 
00023 /* bo functions */
00024 struct radeon_bo_funcs {
00025     struct radeon_bo *(*bo_open)(struct radeon_bo_manager *bom,
00026                                  uint32_t handle,
00027                                  uint32_t size,
00028                                  uint32_t alignment,
00029                                  uint32_t domains,
00030                                  uint32_t flags);
00031     void (*bo_ref)(struct radeon_bo_int *bo);
00032     struct radeon_bo *(*bo_unref)(struct radeon_bo_int *bo);
00033     int (*bo_map)(struct radeon_bo_int *bo, int write);
00034     int (*bo_unmap)(struct radeon_bo_int *bo);
00035     int (*bo_wait)(struct radeon_bo_int *bo);
00036     int (*bo_is_static)(struct radeon_bo_int *bo);
00037     int (*bo_set_tiling)(struct radeon_bo_int *bo, uint32_t tiling_flags,
00038                          uint32_t pitch);
00039     int (*bo_get_tiling)(struct radeon_bo_int *bo, uint32_t *tiling_flags,
00040                          uint32_t *pitch);
00041     int (*bo_is_busy)(struct radeon_bo_int *bo, uint32_t *domain);
00042     int (*bo_is_referenced_by_cs)(struct radeon_bo_int *bo, struct radeon_cs *cs);
00043 };
00044 
00045 #endif