1 /*============================================================================== 2 Copyright(c) 2017 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 "GmmGen9TextureCalc.h" 26 ///////////////////////////////////////////////////////////////////////////////////// 27 /// @file GmmGen10TextureCalc.h 28 /// @brief This file contains the functions and members definations for texture alloc- 29 /// ation on all Gen10 platforms. 30 ///////////////////////////////////////////////////////////////////////////////////// 31 namespace GmmLib 32 { 33 ///////////////////////////////////////////////////////////////////////// 34 /// Contains texture calc functions and members for Gen10 platforms. 35 /// This class is derived from the base GmmTextureCalc class so clients 36 /// shouldn't have to ever interact with this class directly. 37 ///////////////////////////////////////////////////////////////////////// 38 class NON_PAGED_SECTION GmmGen10TextureCalc : 39 public GmmGen9TextureCalc 40 { 41 private: 42 43 protected: 44 /* Function prototypes */ 45 46 virtual uint32_t GetMipTailByteOffset( 47 GMM_TEXTURE_INFO *pTexInfo, 48 uint32_t MipLevel); 49 50 virtual void GetMipTailGeometryOffset( 51 GMM_TEXTURE_INFO *pTexInfo, 52 uint32_t MipLevel, 53 uint32_t* OffsetX, 54 uint32_t* OffsetY, 55 uint32_t* OffsetZ); 56 57 virtual uint32_t GetAligned3DBlockHeight( 58 GMM_TEXTURE_INFO* pTexInfo, 59 uint32_t BlockHeight, 60 uint32_t ExpandedArraySize); 61 62 public: 63 /* Constructors */ GmmGen10TextureCalc(Context * pGmmLibContext)64 GmmGen10TextureCalc(Context *pGmmLibContext) 65 : GmmGen9TextureCalc(pGmmLibContext) 66 { 67 68 } 69 ~GmmGen10TextureCalc()70 ~GmmGen10TextureCalc() 71 { 72 73 } 74 75 /* Function prototypes */ 76 77 virtual GMM_STATUS GMM_STDCALL FillTex2D( 78 GMM_TEXTURE_INFO *pTexInfo, 79 __GMM_BUFFER_TYPE *pRestrictions); 80 81 virtual GMM_STATUS GMM_STDCALL FillTexPlanar( 82 GMM_TEXTURE_INFO *pTexInfo, 83 __GMM_BUFFER_TYPE *pRestrictions); 84 85 /* inline functions */ 86 }; 87 } 88 #endif // #ifdef __cplusplus 89