blob: 93258983e9172556e78649e99dbe304ede617f54 [file] [log] [blame]
Courtney Goeltzenleuchtercc5eb3a2014-08-19 18:35:50 -06001#ifndef XGLDEVICE_H
2#define XGLDEVICE_H
3
4#include "xglgpu.h"
Courtney Goeltzenleuchtera1393b02014-09-01 16:36:49 -06005class XglImage;
Courtney Goeltzenleuchtercc5eb3a2014-08-19 18:35:50 -06006
7class XglDevice : public XglGpu
8{
9public:
10 XglDevice(XGL_UINT id, XGL_PHYSICAL_GPU obj);
11
12 XGL_DEVICE device() {return this->m_xgl_device_object;}
13 void init_formats();
14 void init_device();
Tobin Ehlisc54c9aa2014-10-23 13:45:13 -060015 void destroy_device();
Courtney Goeltzenleuchter70453ed2014-08-20 15:26:23 -060016 void get_device_queue(XGL_QUEUE_TYPE queue_type,
17 XGL_UINT queue_idx);
Courtney Goeltzenleuchterfe4b0dd2014-08-21 17:34:43 -060018 void get_device_queue() {get_device_queue(XGL_QUEUE_TYPE_GRAPHICS, 0);}
Courtney Goeltzenleuchter2a724492014-08-22 16:27:11 -060019 XGL_RESULT AllocAndBindGpuMemory(XGL_OBJECT obj, const std::string &objName, XGL_GPU_MEMORY *pMem);
Courtney Goeltzenleuchtercc5eb3a2014-08-19 18:35:50 -060020
Courtney Goeltzenleuchtera1393b02014-09-01 16:36:49 -060021 void CreateImage(XGL_UINT32 w, XGL_UINT32 h,
22 XGL_FORMAT fmt, XGL_FLAGS usage,
23 XglImage **pImage);
Courtney Goeltzenleuchtercc5eb3a2014-08-19 18:35:50 -060024private:
25 XGL_DEVICE m_xgl_device_object;
26 uint32_t m_flags;
27};
28
29#endif // XGLDEVICE_H