1 /* 2 * Copyright (c) 2021, 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 //! \file mhw_render_itf.h 24 //! \brief MHW RENDER interface common base 25 //! \details 26 //! 27 28 #ifndef __MHW_RENDER_ITF_H__ 29 #define __MHW_RENDER_ITF_H__ 30 31 #include "mhw_itf.h" 32 #include "mhw_render_cmdpar.h" 33 34 #define _RENDER_CMD_DEF(DEF) \ 35 DEF(PIPELINE_SELECT); \ 36 DEF(STATE_BASE_ADDRESS); \ 37 DEF(_3DSTATE_CHROMA_KEY); \ 38 DEF(PALETTE_ENTRY); \ 39 DEF(STATE_SIP); \ 40 DEF(GPGPU_CSR_BASE_ADDRESS); \ 41 DEF(_3DSTATE_BINDING_TABLE_POOL_ALLOC); \ 42 DEF(CFE_STATE); \ 43 DEF(COMPUTE_WALKER); \ 44 DEF(STATE_COMPUTE_MODE) 45 46 namespace mhw 47 { 48 namespace render 49 { 50 class Itf 51 { 52 public: 53 class ParSetting 54 { 55 public: 56 virtual ~ParSetting() = default; 57 _RENDER_CMD_DEF(_MHW_SETPAR_DEF); 58 }; 59 60 virtual ~Itf() = default; 61 62 virtual MOS_STATUS EnableL3Caching(MHW_RENDER_ENGINE_L3_CACHE_SETTINGS *cacheSettings) = 0; 63 // legacy MHW interface will be removed for another pr 64 virtual MOS_STATUS SetL3Cache(PMOS_COMMAND_BUFFER cmdBuffer, MhwMiInterface* pMhwMiInterface) = 0; 65 66 virtual MOS_STATUS EnablePreemption(PMOS_COMMAND_BUFFER cmdBuffer, MhwMiInterface* pMhwMiInterface) = 0; 67 68 virtual MOS_STATUS InitMmioRegisters() = 0; 69 70 virtual PMHW_MI_MMIOREGISTERS GetMmioRegisters() = 0; 71 72 _RENDER_CMD_DEF(_MHW_CMD_ALL_DEF_FOR_ITF); 73 }; 74 } // namespace render 75 } // namespace mhw 76 #endif // __MHW_RENDER_ITF_H__ 77