xref: /aosp_15_r20/external/intel-media-driver/media_driver/agnostic/Xe_M/Xe_XPM/hw/mhw_state_heap_xe_xpm.h (revision ba62d9d3abf0e404f2022b4cd7a85e107f48596f)
1 /*===================== begin_copyright_notice ==================================
2 
3 # Copyright (c) 2020-2021, 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      mhw_state_heap_xe_xpm.h
26 //! \brief         This modules implements HW interface layer to be used on all platforms on
27 //!            all operating systems/DDIs, across MHW components.
28 //!
29 
30 #ifndef __mhw_state_heap_xe_xpm_H__
31 #define __mhw_state_heap_xe_xpm_H__
32 
33 #include "mhw_state_heap_g12.h"
34 #include "mhw_state_heap_hwcmd_xe_xpm.h"
35 
36 struct MHW_STATE_HEAP_INTERFACE_XE_XPM : public MHW_STATE_HEAP_INTERFACE_G12_X
37 {
38 public:
39     MHW_STATE_HEAP_INTERFACE_XE_XPM(PMOS_INTERFACE pInputOSInterface, int8_t bDynamicMode);
40 
41     ~MHW_STATE_HEAP_INTERFACE_XE_XPM();
42 
43     MOS_STATUS SetSamplerState(
44       void                        *pSampler,
45       PMHW_SAMPLER_STATE_PARAM    pParam);
46 
47     MOS_STATUS AddSamplerStateData(
48         uint32_t                    samplerOffset,
49         MemoryBlock                 *memoryBlock,
50         PMHW_SAMPLER_STATE_PARAM    pParam);
51 
52     MOS_STATUS SetSurfaceStateEntry(
53         PMHW_SURFACE_STATE_PARAMS   pParams);
54 
55     MOS_STATUS SetMissingShaderChannels(
56         mhw_state_heap_xe_xpm::RENDER_SURFACE_STATE_CMD *pSurfaceState,
57         uint32_t dwFormat);
58 
59     MOS_STATUS SetInterfaceDescriptor(
60         uint32_t                         dwNumIdsToSet,
61         PMHW_INTERFACE_DESCRIPTOR_PARAMS pParams);
62 };
63 #endif
64