| 1 |
/*============================================================================== |
| 2 |
Copyright(c) 2022 Intel Corporation |
| 3 |
|
| 4 |
Permission is hereby granted, free of charge, to any person obtaining a |
| 5 |
copy of this software and associated documentation files(the "Software"), |
| 6 |
to deal in the Software without restriction, including without limitation |
| 7 |
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 |
and / or sell copies of the Software, and to permit persons to whom the |
| 9 |
Software is furnished to do so, subject to the following conditions: |
| 10 |
|
| 11 |
The above copyright notice and this permission notice shall be included |
| 12 |
in all copies or substantial portions of the Software. |
| 13 |
|
| 14 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 15 |
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 17 |
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 18 |
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 19 |
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 20 |
OTHER DEALINGS IN THE SOFTWARE. |
| 21 |
============================================================================*/ |
| 22 |
|
| 23 |
#pragma once |
| 24 |
#ifdef __cplusplus |
| 25 |
#include "GmmGen12TextureCalc.h" |
| 26 |
#include "../Platform/GmmGen12Platform.h" |
| 27 |
|
| 28 |
///////////////////////////////////////////////////////////////////////////////////// |
| 29 |
/// @file GmmGen12TextureCalc.h |
| 30 |
/// @brief This file contains the functions and members definations for texture alloc- |
| 31 |
/// ation on all Gen12 platforms. |
| 32 |
///////////////////////////////////////////////////////////////////////////////////// |
| 33 |
namespace GmmLib |
| 34 |
{ |
| 35 |
///////////////////////////////////////////////////////////////////////// |
| 36 |
/// Contains texture calc functions and members for Gen12 platforms. |
| 37 |
/// This class is derived from the base GmmTextureCalc class so clients |
| 38 |
/// shouldn't have to ever interact with this class directly. |
| 39 |
///////////////////////////////////////////////////////////////////////// |
| 40 |
class NON_PAGED_SECTION GmmXe_LPGTextureCalc : |
| 41 |
public GmmGen12TextureCalc |
| 42 |
{ |
| 43 |
public: |
| 44 |
/* Constructors */ |
| 45 |
|
| 46 |
GmmXe_LPGTextureCalc(Context *pGmmLibContext) |
| 47 |
: GmmGen12TextureCalc(pGmmLibContext) |
| 48 |
{ |
| 49 |
|
| 50 |
} |
| 51 |
|
| 52 |
~GmmXe_LPGTextureCalc() |
| 53 |
{ |
| 54 |
|
| 55 |
} |
| 56 |
|
| 57 |
/* Function prototypes */ |
| 58 |
|
| 59 |
virtual GMM_STATUS GMM_STDCALL FillTexPlanar(GMM_TEXTURE_INFO *pTexInfo, |
| 60 |
__GMM_BUFFER_TYPE *pRestrictions); |
| 61 |
virtual void FillPlanarOffsetAddress(GMM_TEXTURE_INFO *pTexInfo); |
| 62 |
virtual GMM_STATUS GetTexLockOffset(GMM_TEXTURE_INFO *pTexInfo, |
| 63 |
GMM_REQ_OFFSET_INFO *pReqInfo); |
| 64 |
virtual GMM_GFX_SIZE_T GetMipMapByteAddress(GMM_TEXTURE_INFO *pTexInfo, |
| 65 |
GMM_REQ_OFFSET_INFO *pReqInfo); |
| 66 |
virtual uint32_t GMM_STDCALL IsTileAlignedPlanes(GMM_TEXTURE_INFO *pTexInfo); |
| 67 |
virtual uint32_t GMM_STDCALL GetNumberOfPlanes(GMM_TEXTURE_INFO *pTexInfo); |
| 68 |
virtual void GMM_STDCALL SetPlanarOffsetInfo(GMM_TEXTURE_INFO *pTexInfo, |
| 69 |
GMM_RESCREATE_CUSTOM_PARAMS &CreateParams); |
| 70 |
#ifndef __GMM_KMD__ |
| 71 |
virtual void GMM_STDCALL SetPlanarOffsetInfo_2(GMM_TEXTURE_INFO *pTexInfo, |
| 72 |
GMM_RESCREATE_CUSTOM_PARAMS_2 &CreateParams); |
| 73 |
#endif |
| 74 |
virtual void GMM_STDCALL SetPlaneUnAlignedTexOffsetInfo(GMM_TEXTURE_INFO *pTexInfo, |
| 75 |
uint32_t YHeight, |
| 76 |
uint32_t VHeight); |
| 77 |
virtual void GMM_STDCALL GetPlaneIdForCpuBlt(GMM_TEXTURE_INFO *pTexInfo, |
| 78 |
GMM_RES_COPY_BLT *pBlt, |
| 79 |
uint32_t *PlaneId); |
| 80 |
virtual void GMM_STDCALL GetBltInfoPerPlane(GMM_TEXTURE_INFO *pTexInfo, |
| 81 |
GMM_RES_COPY_BLT *pBlt, |
| 82 |
uint32_t PlaneId); |
| 83 |
|
| 84 |
/* inline functions */ |
| 85 |
}; |
| 86 |
} |
| 87 |
#endif // #ifdef __cplusplus |