| 1 |
/* |
| 2 |
* Copyright (C) 2021 Intel Corporation |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: MIT |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
#pragma once |
| 9 |
|
| 10 |
#include "gmm_resource_info_struct.h" |
| 11 |
|
| 12 |
using GmmAccessorBase = GmmLib::GmmResourceInfo; |
| 13 |
|
| 14 |
class GmmResourceInfoWinAccessor : public GmmAccessorBase { |
| 15 |
public: |
| 16 |
GmmResourceInfoWinAccessor() { |
| 17 |
} |
| 18 |
GmmAccessorBase &operator=(const GmmAccessorBase &rhs) { |
| 19 |
GmmAccessorBase::operator=(rhs); |
| 20 |
return *this; |
| 21 |
} |
| 22 |
|
| 23 |
void set(const GmmResourceInfoCommonStruct &src) { |
| 24 |
this->ClientType = src.ClientType; |
| 25 |
this->Surf = src.Surf; |
| 26 |
this->AuxSurf = src.AuxSurf; |
| 27 |
this->AuxSecSurf = src.AuxSecSurf; |
| 28 |
|
| 29 |
this->RotateInfo = src.RotateInfo; |
| 30 |
this->ExistingSysMem = src.ExistingSysMem; |
| 31 |
this->SvmAddress = src.SvmAddress; |
| 32 |
|
| 33 |
this->pPrivateData = src.pPrivateData; |
| 34 |
|
| 35 |
this->MultiTileArch = src.MultiTileArch; |
| 36 |
} |
| 37 |
|
| 38 |
void set(const GmmResourceInfoWinStruct &src) { |
| 39 |
this->set(src.GmmResourceInfoCommon); |
| 40 |
} |
| 41 |
|
| 42 |
void get(GmmResourceInfoCommonStruct &dst) const { |
| 43 |
dst.ClientType = this->ClientType; |
| 44 |
dst.Surf = this->Surf; |
| 45 |
dst.AuxSurf = this->AuxSurf; |
| 46 |
dst.AuxSecSurf = this->AuxSecSurf; |
| 47 |
|
| 48 |
dst.RotateInfo = this->RotateInfo; |
| 49 |
dst.ExistingSysMem = this->ExistingSysMem; |
| 50 |
dst.SvmAddress = this->SvmAddress; |
| 51 |
|
| 52 |
dst.pPrivateData = this->pPrivateData; |
| 53 |
|
| 54 |
dst.MultiTileArch = this->MultiTileArch; |
| 55 |
} |
| 56 |
|
| 57 |
void get(GmmResourceInfoWinStruct &dst) const { |
| 58 |
this->get(dst.GmmResourceInfoCommon); |
| 59 |
} |
| 60 |
}; |