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 vphal_debug_xe_xpm.h 26 //! \brief Definition of extention structures and functions for debugging VPHAL 27 //! \details This file contains the extension definition of structures and functions for 28 //! surface dumper, hw state dumper, perf counter dumper, and render 29 //! parameter dumper 30 //! 31 #ifndef __VPHAL_DEBUG_XE_XPM_H__ 32 #define __VPHAL_DEBUG_XE_XPM_H__ 33 34 #include "vphal_debug.h" 35 #include "vphal.h" 36 #include "media_blt_copy_xe_xpm_base.h" 37 38 #if (_DEBUG || _RELEASE_INTERNAL) 39 //==<Surface dump>============================================================== 40 #define VPHAL_DBG_SURF_DUMP_CREATE_XE_XPM() \ 41 m_surfaceDumper = MOS_New(VphalSurfaceDumperXe_Xpm, m_pOsInterface); \ 42 if (m_surfaceDumper) \ 43 m_surfaceDumper->GetSurfaceDumpSpec(); 44 45 //! 46 //! Class VphalState 47 //! \brief VPHAL class definition 48 //! 49 class VphalSurfaceDumperXe_Xpm : public VphalSurfaceDumper 50 { 51 public: 52 // allocate and VpHalDbg_GetSurfaceDumpSpec 53 VphalSurfaceDumperXe_Xpm(PMOS_INTERFACE pOsInterface); 54 55 // VpHalDbg_FreeSurfaceSpec 56 virtual ~VphalSurfaceDumperXe_Xpm(); 57 58 // Get BltState 59 BltStateXe_Xpm *GetBltState(); 60 61 virtual MOS_STATUS DumpSurfaceToFile( 62 PMOS_INTERFACE pOsInterface, 63 PVPHAL_SURFACE pSurface, 64 const char* psPathPrefix, 65 uint64_t iCounter, 66 bool bLockSurface, 67 bool bNoDecompWhenLock, 68 uint8_t* pData); 69 70 #if !EMUL 71 virtual MOS_STATUS DumpCompressedSurface( 72 PMOS_INTERFACE pOsInterface, 73 PVPHAL_SURFACE pSurface, 74 const char * psPathPrefix, 75 uint64_t iCounter, 76 bool bLockSurface); 77 #endif 78 79 protected: 80 81 BltStateXe_Xpm *pBltState; 82 }; 83 #else 84 #define VPHAL_DBG_SURF_DUMP_CREATE_XE_XPM() 85 #endif 86 #endif // __VPHAL_DEBUG_XE_XPM_H__ 87