Courtney Goeltzenleuchter | cc5eb3a | 2014-08-19 18:35:50 -0600 | [diff] [blame] | 1 | #ifndef XGLDEVICE_H |
| 2 | #define XGLDEVICE_H |
| 3 | |
| 4 | #include "xglgpu.h" |
Courtney Goeltzenleuchter | a1393b0 | 2014-09-01 16:36:49 -0600 | [diff] [blame] | 5 | class XglImage; |
Courtney Goeltzenleuchter | cc5eb3a | 2014-08-19 18:35:50 -0600 | [diff] [blame] | 6 | |
| 7 | class XglDevice : public XglGpu |
| 8 | { |
| 9 | public: |
| 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 Ehlis | c54c9aa | 2014-10-23 13:45:13 -0600 | [diff] [blame^] | 15 | void destroy_device(); |
Courtney Goeltzenleuchter | 70453ed | 2014-08-20 15:26:23 -0600 | [diff] [blame] | 16 | void get_device_queue(XGL_QUEUE_TYPE queue_type, |
| 17 | XGL_UINT queue_idx); |
Courtney Goeltzenleuchter | fe4b0dd | 2014-08-21 17:34:43 -0600 | [diff] [blame] | 18 | void get_device_queue() {get_device_queue(XGL_QUEUE_TYPE_GRAPHICS, 0);} |
Courtney Goeltzenleuchter | 2a72449 | 2014-08-22 16:27:11 -0600 | [diff] [blame] | 19 | XGL_RESULT AllocAndBindGpuMemory(XGL_OBJECT obj, const std::string &objName, XGL_GPU_MEMORY *pMem); |
Courtney Goeltzenleuchter | cc5eb3a | 2014-08-19 18:35:50 -0600 | [diff] [blame] | 20 | |
Courtney Goeltzenleuchter | a1393b0 | 2014-09-01 16:36:49 -0600 | [diff] [blame] | 21 | void CreateImage(XGL_UINT32 w, XGL_UINT32 h, |
| 22 | XGL_FORMAT fmt, XGL_FLAGS usage, |
| 23 | XglImage **pImage); |
Courtney Goeltzenleuchter | cc5eb3a | 2014-08-19 18:35:50 -0600 | [diff] [blame] | 24 | private: |
| 25 | XGL_DEVICE m_xgl_device_object; |
| 26 | uint32_t m_flags; |
| 27 | }; |
| 28 | |
| 29 | #endif // XGLDEVICE_H |