Debian Codegraph @

media_softlet/agnostic/common/vp/hal/packet/vp_render_ocl_fc_kernel.h

raw
1 /*
2 * Copyright (c) 2024, 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 #ifndef __VP_RENDER_OCL_FC_KERNEL_H__
23 #define __VP_RENDER_OCL_FC_KERNEL_H__
24
25 #include "vp_platform_interface.h"
26 #include "vp_render_kernel_obj.h"
27
28 namespace vp
29 {
30
31 class VpRenderOclFcKernel : public VpRenderKernelObj
32 {
33 public:
34 VpRenderOclFcKernel(PVP_MHWINTERFACE hwInterface, VpKernelID kernelID, uint32_t kernelIndex, PVpAllocator allocator);
35 virtual ~VpRenderOclFcKernel();
36
37 virtual MOS_STATUS Init(VpRenderKernel &kernel);
38 virtual MOS_STATUS GetCurbeState(void *&curbe, uint32_t &curbeLength);
39 virtual uint32_t GetInlineDataSize() override
40 {
41 return 0;
42 }
43 virtual MOS_STATUS SetSamplerStates(KERNEL_SAMPLER_STATE_GROUP &samplerStateGroup);
44 virtual MOS_STATUS GetWalkerSetting(KERNEL_WALKER_PARAMS &walkerParam, KERNEL_PACKET_RENDER_DATA &renderData);
45
46 virtual MOS_STATUS SetKernelConfigs(KERNEL_CONFIGS &kernelConfigs) override;
47 virtual MOS_STATUS SetPerfTag() override;
48
49 MOS_STATUS FreeCurbe(void *&curbe)
50 {
51 return MOS_STATUS_SUCCESS;
52 }
53
54 protected:
55 virtual MOS_STATUS SetupSurfaceState() override;
56 virtual MOS_STATUS SetWalkerSetting(KERNEL_THREAD_SPACE &threadSpace, bool bSyncFlag, bool flushL1 = false);
57 virtual MOS_STATUS SetKernelArgs(KERNEL_ARGS &kernelArgs, VP_PACKET_SHARED_CONTEXT *sharedContext);
58 virtual MOS_STATUS GetKernelSurfaceParam(bool isBTI, SURFACE_PARAMS &surfParam, KERNEL_SURFACE_STATE_PARAM &kernelSurfaceParam);
59
60 PRENDERHAL_INTERFACE m_renderHal = nullptr;
61
62 //kernel Arguments
63 KERNEL_INDEX_ARG_MAP m_kernelArgs = {};
64 KERNEL_BTIS m_kernelBtis = {};
65 KRN_EXECUTE_ENV m_kernelEnv = {};
66 KERNEL_WALKER_PARAMS m_walkerParam = {};
67 void *m_curbe = nullptr;
68 uint32_t m_kernelIndex = 0;
69 int32_t m_linearSamplerIndex = -1;
70 int32_t m_nearestSamplerIndex = -1;
71 std ::vector<uint8_t> m_inlineData = {};
72 OCL_FC_KERNEL_CONFIG m_kernelConfig = {};
73
74 MEDIA_CLASS_DEFINE_END(vp__VpRenderOclFcKernel)
75 };
76 } // namespace vp
77 #endif //__VP_RENDER_OCL_FC_KERNEL_H__