| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
#ifndef MEDIADRIVER_AGNOSTIC_COMMON_CM_CMSURFACESAMPLER_H_ |
| 28 |
#define MEDIADRIVER_AGNOSTIC_COMMON_CM_CMSURFACESAMPLER_H_ |
| 29 |
|
| 30 |
#include "cm_surface.h" |
| 31 |
|
| 32 |
enum SAMPLER_SURFACE_TYPE |
| 33 |
{ |
| 34 |
SAMPLER_SURFACE_TYPE_2D, |
| 35 |
SAMPLER_SURFACE_TYPE_2DUP, |
| 36 |
SAMPLER_SURFACE_TYPE_3D |
| 37 |
}; |
| 38 |
|
| 39 |
namespace CMRT_UMD |
| 40 |
{ |
| 41 |
class CmSurfaceSampler : public CmSurface |
| 42 |
{ |
| 43 |
public: |
| 44 |
static int32_t Create(uint32_t index, uint32_t handleFor2D3D, uint32_t indexForCurrent, SAMPLER_SURFACE_TYPE surfaceType, CmSurfaceManager* surfaceManager, CmSurfaceSampler* &surfaceSampler, CM_FLAG* flag); |
| 45 |
virtual int32_t GetSurfaceIndex(SurfaceIndex*& index); |
| 46 |
int32_t GetHandle( uint32_t& handle ); |
| 47 |
int32_t GetSurfaceType(SAMPLER_SURFACE_TYPE& type); |
| 48 |
int32_t GetCmIndexCurrent( uint16_t & index ) ; |
| 49 |
int32_t SetMemoryObjectControl(MEMORY_OBJECT_CONTROL memCtrl, MEMORY_TYPE memType, uint32_t age); |
| 50 |
|
| 51 |
|
| 52 |
CM_ENUM_CLASS_TYPE Type() const {return CM_ENUM_CLASS_TYPE_CMSURFACESAMPLER;}; |
| 53 |
|
| 54 |
protected: |
| 55 |
CmSurfaceSampler(uint32_t indexForCurrent, uint32_t handleFor2D3D, SAMPLER_SURFACE_TYPE surfaceType, CmSurfaceManager* surfaceManager, CM_FLAG* flag); |
| 56 |
~CmSurfaceSampler( void ); |
| 57 |
|
| 58 |
int32_t Initialize( uint32_t index ); |
| 59 |
uint32_t m_handleFor2D3D; |
| 60 |
uint32_t m_indexForCurrent; |
| 61 |
|
| 62 |
SAMPLER_SURFACE_TYPE m_surfaceType; |
| 63 |
CM_FLAG m_flag; |
| 64 |
|
| 65 |
private: |
| 66 |
CmSurfaceSampler(const CmSurfaceSampler& other); |
| 67 |
CmSurfaceSampler& operator=(const CmSurfaceSampler& other); |
| 68 |
}; |
| 69 |
}; |
| 70 |
|
| 71 |
#endif |