| 1 | /*===================== begin_copyright_notice ================================== |
| 2 | |
| 3 | * Copyright (c) 2024, Intel Corporation |
| 4 | * |
| 5 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 6 | * copy of this software and associated documentation files (the "Software"), |
| 7 | * to deal in the Software without restriction, including without limitation |
| 8 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 9 | * and/or sell copies of the Software, and to permit persons to whom the |
| 10 | * Software is furnished to do so, subject to the following conditions: |
| 11 | * |
| 12 | * The above copyright notice and this permission notice shall be included |
| 13 | * in all copies or substantial portions of the Software. |
| 14 | * |
| 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 16 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 19 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 20 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 21 | * OTHER DEALINGS IN THE SOFTWARE. |
| 22 | |
| 23 | ======================= end_copyright_notice ==================================*/ |
| 24 | //! |
| 25 | //! \file renderhal_xe2_hpg_next.h |
| 26 | //! \brief header file of xe_hpg hardware functions |
| 27 | //! \details Gen12 hardware functions declare |
| 28 | //! |
| 29 | #ifndef __RENDERHAL_XE2_HPG_NEXT_H__ |
| 30 | #define __RENDERHAL_XE2_HPG_NEXT_H__ |
| 31 | |
| 32 | #include "renderhal_xe_hpg_base.h" |
| 33 | |
| 34 | class XRenderHal_Interface_Xe2_Hpg_Next : public XRenderHal_Interface_Xe_Hpg_Base |
| 35 | { |
| 36 | public: |
| 37 | XRenderHal_Interface_Xe2_Hpg_Next() : XRenderHal_Interface_Xe_Hpg_Base() |
| 38 | { |
| 39 | |
| 40 | } |
| 41 | |
| 42 | virtual ~XRenderHal_Interface_Xe2_Hpg_Next() {} |
| 43 | |
| 44 | //! |
| 45 | //! \brief Setup Surface State |
| 46 | //! \details Setup Surface States for Xe_HPM |
| 47 | //! \param PRENDERHAL_INTERFACE pRenderHal |
| 48 | //! [in] Pointer to Hardware Interface Structure |
| 49 | //! \param PRENDERHAL_SURFACE pRenderHalSurface |
| 50 | //! [in] Pointer to Render Hal Surface |
| 51 | //! \param PRENDERHAL_SURFACE_STATE_PARAMS pParams |
| 52 | //! [in] Pointer to Surface State Params |
| 53 | //! \param int32_t *piNumEntries |
| 54 | //! [out] Pointer to Number of Surface State Entries (Num Planes) |
| 55 | //! \param PRENDERHAL_SURFACE_STATE_ENTRY * ppSurfaceEntries |
| 56 | //! [out] Array of Surface State Entries |
| 57 | //! \param PRENDERHAL_OFFSET_OVERRIDE pOffsetOverride |
| 58 | //! [in] If not nullptr, provides adjustments to Y, UV plane offsets, |
| 59 | //! used for kernel WA in a few cases. nullptr is the most common usage. |
| 60 | //! \return MOS_STATUS |
| 61 | //! |
| 62 | MOS_STATUS SetupSurfaceState( |
| 63 | PRENDERHAL_INTERFACE pRenderHal, |
| 64 | PRENDERHAL_SURFACE pRenderHalSurface, |
| 65 | PRENDERHAL_SURFACE_STATE_PARAMS pParams, |
| 66 | int32_t *piNumEntries, |
| 67 | PRENDERHAL_SURFACE_STATE_ENTRY *ppSurfaceEntries, |
| 68 | PRENDERHAL_OFFSET_OVERRIDE pOffsetOverride) override; |
| 69 | |
| 70 | //! |
| 71 | //! \brief Get Render Engine MMC Enable/Disable Flag. Actually the same as Xe_HPG |
| 72 | //! \param [in] pRenderHal |
| 73 | //! Pointer to Hardware Interface |
| 74 | //! \return MOS_STATUS |
| 75 | //! MOS_STATUS_SUCCESS if success, else fail reason |
| 76 | //! |
| 77 | virtual MOS_STATUS IsRenderHalMMCEnabled( |
| 78 | PRENDERHAL_INTERFACE pRenderHal); |
| 79 | |
| 80 | //! \brief Send To 3DState Binding Table Pool Alloc |
| 81 | //! \details Send To 3DState Binding Table Pool Alloc |
| 82 | //! \param PRENDERHAL_INTERFACE pRenderHal |
| 83 | //! [in] Pointer to RenderHal Interface Structure |
| 84 | //! \param PMOS_COMMAND_BUFFER pCmdBuffer |
| 85 | //! [in] Pointer to Command Buffer |
| 86 | //! \return MOS_STATUS |
| 87 | virtual MOS_STATUS SendTo3DStateBindingTablePoolAlloc( |
| 88 | PRENDERHAL_INTERFACE pRenderHal, |
| 89 | PMOS_COMMAND_BUFFER pCmdBuffer); |
| 90 | |
| 91 | virtual bool IsL8FormatSupported() |
| 92 | { |
| 93 | return false; |
| 94 | } |
| 95 | |
| 96 | //! |
| 97 | //! \brief Initialize the State Heap Settings per platform |
| 98 | //! \param PRENDERHAL_INTERFACE pRenderHal |
| 99 | //! [out] Pointer to PRENDERHAL_INTERFACE |
| 100 | //! \return void |
| 101 | //! |
| 102 | virtual void InitStateHeapSettings( |
| 103 | PRENDERHAL_INTERFACE pRenderHal) override; |
| 104 | |
| 105 | virtual uint32_t GetGrfSize() override |
| 106 | { |
| 107 | return 64; |
| 108 | } |
| 109 | |
| 110 | MEDIA_CLASS_DEFINE_END(XRenderHal_Interface_Xe2_Hpg_Next) |
| 111 | }; |
| 112 | |
| 113 | #endif // __RENDERHAL_XE_HPG_NEXT_H__ |