diff options
author | Jakob Bornecrantz <wallbraker@gmail.com> | 2010-03-25 19:19:00 +0100 |
---|---|---|
committer | Jakob Bornecrantz <wallbraker@gmail.com> | 2010-03-26 00:38:17 +0100 |
commit | bc88c95990f871a206a8fe93e7541f1f41841f7e (patch) | |
tree | fe394e2b3dedc3ab6de5c2f108bf0c5c78983872 /src/gallium/winsys/i915/drm/i915_drm_winsys.h | |
parent | 80672e84cf79ab12b7a4ff56567184d1c39baef3 (diff) |
i915g: Rename winsys prefix to i915_ from intel_
Since the winsys isn't shared with i965 and never will be
Diffstat (limited to 'src/gallium/winsys/i915/drm/i915_drm_winsys.h')
-rw-r--r-- | src/gallium/winsys/i915/drm/i915_drm_winsys.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/src/gallium/winsys/i915/drm/i915_drm_winsys.h b/src/gallium/winsys/i915/drm/i915_drm_winsys.h new file mode 100644 index 0000000000..217c4a7eaf --- /dev/null +++ b/src/gallium/winsys/i915/drm/i915_drm_winsys.h @@ -0,0 +1,77 @@ + +#ifndef INTEL_DRM_WINSYS_H +#define INTEL_DRM_WINSYS_H + +#include "i915/i915_batchbuffer.h" + +#include "drm.h" +#include "intel_bufmgr.h" + + +/* + * Winsys + */ + + +struct i915_drm_winsys +{ + struct i915_winsys base; + + boolean dump_cmd; + + int fd; /**< Drm file discriptor */ + + unsigned id; + + size_t max_batch_size; + + struct { + drm_intel_bufmgr *gem; + } pools; +}; + +static INLINE struct i915_drm_winsys * +i915_drm_winsys(struct i915_winsys *iws) +{ + return (struct i915_drm_winsys *)iws; +} + +struct i915_drm_winsys * i915_drm_winsys_create(int fd, unsigned pci_id); +struct pipe_fence_handle * i915_drm_fence_create(drm_intel_bo *bo); + +void i915_drm_winsys_init_batchbuffer_functions(struct i915_drm_winsys *idws); +void i915_drm_winsys_init_buffer_functions(struct i915_drm_winsys *idws); +void i915_drm_winsys_init_fence_functions(struct i915_drm_winsys *idws); + + +/* + * Buffer + */ + + +struct i915_drm_buffer { + unsigned magic; + + drm_intel_bo *bo; + + void *ptr; + unsigned map_count; + boolean map_gtt; + + boolean flinked; + unsigned flink; +}; + +static INLINE struct i915_drm_buffer * +i915_drm_buffer(struct i915_winsys_buffer *buffer) +{ + return (struct i915_drm_buffer *)buffer; +} + +static INLINE drm_intel_bo * +intel_bo(struct i915_winsys_buffer *buffer) +{ + return i915_drm_buffer(buffer)->bo; +} + +#endif |