mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
i965/drm: Merge drm_bacon_bo_gem into drm_bacon_bo.
The separate class gives us a bit of extra encapsulation, but I don't know that it's really worth the boilerplate. I think we can reasonably expect the rest of the driver to be responsible. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
59fdd94b85
commit
9ee252865e
2 changed files with 272 additions and 321 deletions
|
|
@ -37,6 +37,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include "util/list.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
|
@ -95,6 +96,42 @@ struct _drm_bacon_bo {
|
|||
* processes, so we don't know their state.
|
||||
*/
|
||||
bool idle;
|
||||
|
||||
int refcount;
|
||||
const char *name;
|
||||
|
||||
/**
|
||||
* Kenel-assigned global name for this object
|
||||
*
|
||||
* List contains both flink named and prime fd'd objects
|
||||
*/
|
||||
unsigned int global_name;
|
||||
|
||||
/**
|
||||
* Current tiling mode
|
||||
*/
|
||||
uint32_t tiling_mode;
|
||||
uint32_t swizzle_mode;
|
||||
unsigned long stride;
|
||||
|
||||
time_t free_time;
|
||||
|
||||
/** Mapped address for the buffer, saved across map/unmap cycles */
|
||||
void *mem_virtual;
|
||||
/** GTT virtual address for the buffer, saved across map/unmap cycles */
|
||||
void *gtt_virtual;
|
||||
/** WC CPU address for the buffer, saved across map/unmap cycles */
|
||||
void *wc_virtual;
|
||||
int map_count;
|
||||
struct list_head vma_list;
|
||||
|
||||
/** BO cache list */
|
||||
struct list_head head;
|
||||
|
||||
/**
|
||||
* Boolean of whether this buffer can be re-used
|
||||
*/
|
||||
bool reusable;
|
||||
};
|
||||
|
||||
#define BO_ALLOC_FOR_RENDER (1<<0)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue