Path: blob/21.2-virgl/src/gallium/frontends/d3d10umd/Resource.h
4566 views
/**************************************************************************1*2* Copyright 2012-2021 VMware, Inc.3* All Rights Reserved.4*5* Permission is hereby granted, free of charge, to any person obtaining a6* copy of this software and associated documentation files (the7* "Software"), to deal in the Software without restriction, including8* without limitation the rights to use, copy, modify, merge, publish,9* distribute, sub license, and/or sell copies of the Software, and to10* permit persons to whom the Software is furnished to do so, subject to11* the following conditions:12*13* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR14* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,15* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL16* THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,17* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR18* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE19* USE OR OTHER DEALINGS IN THE SOFTWARE.20*21* The above copyright notice and this permission notice (including the22* next paragraph) shall be included in all copies or substantial portions23* of the Software.24*25**************************************************************************/2627/*28* Resource.h --29* Functions that manipulate GPU resources.30*/3132#ifndef RESOURCE_H33#define RESOURCE_H3435#include "DriverIncludes.h"3637SIZE_T APIENTRY CalcPrivateResourceSize(38D3D10DDI_HDEVICE hDevice,39__in const D3D10DDIARG_CREATERESOURCE *pCreateResource);4041void APIENTRY CreateResource(42D3D10DDI_HDEVICE hDevice,43__in const D3D10DDIARG_CREATERESOURCE *pCreateResource,44D3D10DDI_HRESOURCE hResource,45D3D10DDI_HRTRESOURCE hRTResource);4647SIZE_T APIENTRY CalcPrivateOpenedResourceSize(48D3D10DDI_HDEVICE hDevice,49__in const D3D10DDIARG_OPENRESOURCE *pOpenResource);5051void APIENTRY OpenResource(52D3D10DDI_HDEVICE hDevice,53__in const D3D10DDIARG_OPENRESOURCE *pOpenResource,54D3D10DDI_HRESOURCE hResource,55D3D10DDI_HRTRESOURCE hRTResource);5657void APIENTRY DestroyResource(D3D10DDI_HDEVICE hDevice, D3D10DDI_HRESOURCE hResource);5859void APIENTRY ResourceMap(D3D10DDI_HDEVICE hDevice, D3D10DDI_HRESOURCE hResource,60UINT SubResource, D3D10_DDI_MAP DDIMap, UINT Flags,61__out D3D10DDI_MAPPED_SUBRESOURCE *pMappedSubResource);6263void APIENTRY ResourceUnmap(D3D10DDI_HDEVICE hDevice, D3D10DDI_HRESOURCE hResource,64UINT SubResource);6566void APIENTRY ResourceCopy(D3D10DDI_HDEVICE hDevice, D3D10DDI_HRESOURCE hDstResource,67D3D10DDI_HRESOURCE hSrcResource);6869void APIENTRY ResourceCopyRegion(D3D10DDI_HDEVICE hDevice, D3D10DDI_HRESOURCE hResource,70UINT DstSubResource, UINT DstX, UINT DstY, UINT DstZ,71D3D10DDI_HRESOURCE hSrcResource, UINT SrcSubResource,72__in_opt const D3D10_DDI_BOX *pSrcBox);7374void APIENTRY ResourceResolveSubResource(D3D10DDI_HDEVICE hDevice,75D3D10DDI_HRESOURCE hDstResource,76UINT DstSubResource,77D3D10DDI_HRESOURCE hSrcResource,78UINT SrcSubResource,79DXGI_FORMAT ResolveFormat);8081BOOL APIENTRY ResourceIsStagingBusy(D3D10DDI_HDEVICE hDevice,82D3D10DDI_HRESOURCE hResource);8384void APIENTRY ResourceReadAfterWriteHazard(D3D10DDI_HDEVICE hDevice,85D3D10DDI_HRESOURCE hResource);8687void APIENTRY ResourceUpdateSubResourceUP(88D3D10DDI_HDEVICE hDevice, D3D10DDI_HRESOURCE hResource,89UINT DstSubResource, __in_opt const D3D10_DDI_BOX *pDstBox,90__in const void *pSysMemUP, UINT RowPitch, UINT DepthPitch);9192#endif /* RESOURCE_H */939495