1bf215546Sopenharmony_ci/************************************************************************** 2bf215546Sopenharmony_ci * 3bf215546Sopenharmony_ci * Copyright 2012-2021 VMware, Inc. 4bf215546Sopenharmony_ci * All Rights Reserved. 5bf215546Sopenharmony_ci * 6bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 7bf215546Sopenharmony_ci * copy of this software and associated documentation files (the 8bf215546Sopenharmony_ci * "Software"), to deal in the Software without restriction, including 9bf215546Sopenharmony_ci * without limitation the rights to use, copy, modify, merge, publish, 10bf215546Sopenharmony_ci * distribute, sub license, and/or sell copies of the Software, and to 11bf215546Sopenharmony_ci * permit persons to whom the Software is furnished to do so, subject to 12bf215546Sopenharmony_ci * the following conditions: 13bf215546Sopenharmony_ci * 14bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15bf215546Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16bf215546Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 17bf215546Sopenharmony_ci * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, 18bf215546Sopenharmony_ci * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 19bf215546Sopenharmony_ci * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 20bf215546Sopenharmony_ci * USE OR OTHER DEALINGS IN THE SOFTWARE. 21bf215546Sopenharmony_ci * 22bf215546Sopenharmony_ci * The above copyright notice and this permission notice (including the 23bf215546Sopenharmony_ci * next paragraph) shall be included in all copies or substantial portions 24bf215546Sopenharmony_ci * of the Software. 25bf215546Sopenharmony_ci * 26bf215546Sopenharmony_ci **************************************************************************/ 27bf215546Sopenharmony_ci 28bf215546Sopenharmony_ci/* 29bf215546Sopenharmony_ci * Shader.h -- 30bf215546Sopenharmony_ci * Functions that manipulate shader resources. 31bf215546Sopenharmony_ci */ 32bf215546Sopenharmony_ci 33bf215546Sopenharmony_ci#ifndef SHADER_H 34bf215546Sopenharmony_ci#define SHADER_H 35bf215546Sopenharmony_ci 36bf215546Sopenharmony_ci#include "DriverIncludes.h" 37bf215546Sopenharmony_ci 38bf215546Sopenharmony_cistruct Device; 39bf215546Sopenharmony_cistruct Shader; 40bf215546Sopenharmony_ci 41bf215546Sopenharmony_civoid * 42bf215546Sopenharmony_ciCreateEmptyShader(Device *pDevice, 43bf215546Sopenharmony_ci enum pipe_shader_type processor); 44bf215546Sopenharmony_ci 45bf215546Sopenharmony_civoid 46bf215546Sopenharmony_ciDeleteEmptyShader(Device *pDevice, 47bf215546Sopenharmony_ci enum pipe_shader_type processor, void *handle); 48bf215546Sopenharmony_ci 49bf215546Sopenharmony_ciunsigned 50bf215546Sopenharmony_ciShaderFindOutputMapping(Shader *shader, unsigned registerIndex); 51bf215546Sopenharmony_ci 52bf215546Sopenharmony_ciSIZE_T APIENTRY 53bf215546Sopenharmony_ciCalcPrivateShaderSize(D3D10DDI_HDEVICE hDevice, 54bf215546Sopenharmony_ci __in_ecount (pShaderCode[1]) const UINT *pShaderCode, 55bf215546Sopenharmony_ci __in const D3D10DDIARG_STAGE_IO_SIGNATURES *pSignatures); 56bf215546Sopenharmony_ci 57bf215546Sopenharmony_civoid APIENTRY 58bf215546Sopenharmony_ciDestroyShader(D3D10DDI_HDEVICE hDevice, D3D10DDI_HSHADER hShader); 59bf215546Sopenharmony_ci 60bf215546Sopenharmony_ciSIZE_T APIENTRY 61bf215546Sopenharmony_ciCalcPrivateSamplerSize(D3D10DDI_HDEVICE hDevice, 62bf215546Sopenharmony_ci __in const D3D10_DDI_SAMPLER_DESC *pSamplerDesc); 63bf215546Sopenharmony_ci 64bf215546Sopenharmony_civoid APIENTRY CreateSampler(D3D10DDI_HDEVICE hDevice, 65bf215546Sopenharmony_ci __in const D3D10_DDI_SAMPLER_DESC *pSamplerDesc, 66bf215546Sopenharmony_ci D3D10DDI_HSAMPLER hSampler, D3D10DDI_HRTSAMPLER hRTSampler); 67bf215546Sopenharmony_ci 68bf215546Sopenharmony_civoid APIENTRY DestroySampler(D3D10DDI_HDEVICE hDevice, D3D10DDI_HSAMPLER hSampler); 69bf215546Sopenharmony_ci 70bf215546Sopenharmony_civoid APIENTRY CreateVertexShader(D3D10DDI_HDEVICE hDevice, 71bf215546Sopenharmony_ci __in_ecount (pShaderCode[1]) const UINT *pCode, 72bf215546Sopenharmony_ci D3D10DDI_HSHADER hShader, D3D10DDI_HRTSHADER hRTShader, 73bf215546Sopenharmony_ci __in const D3D10DDIARG_STAGE_IO_SIGNATURES *pSignatures); 74bf215546Sopenharmony_ci 75bf215546Sopenharmony_civoid APIENTRY VsSetShader(D3D10DDI_HDEVICE hDevice, D3D10DDI_HSHADER hShader); 76bf215546Sopenharmony_ci 77bf215546Sopenharmony_civoid APIENTRY VsSetShaderResources( 78bf215546Sopenharmony_ci D3D10DDI_HDEVICE hDevice, UINT Offset, UINT NumViews, 79bf215546Sopenharmony_ci __in_ecount (NumViews) const D3D10DDI_HSHADERRESOURCEVIEW *phShaderResourceViews); 80bf215546Sopenharmony_civoid APIENTRY VsSetConstantBuffers(D3D10DDI_HDEVICE hDevice, UINT StartBuffer, UINT NumBuffers, 81bf215546Sopenharmony_ci __in_ecount (NumBuffers) const D3D10DDI_HRESOURCE *phBuffers); 82bf215546Sopenharmony_ci 83bf215546Sopenharmony_civoid APIENTRY VsSetSamplers(D3D10DDI_HDEVICE hDevice, UINT Offset, UINT NumSamplers, 84bf215546Sopenharmony_ci __in_ecount (NumSamplers) const D3D10DDI_HSAMPLER *phSamplers); 85bf215546Sopenharmony_ci 86bf215546Sopenharmony_civoid APIENTRY CreateGeometryShader(D3D10DDI_HDEVICE hDevice, 87bf215546Sopenharmony_ci __in_ecount (pShaderCode[1]) const UINT *pCode, 88bf215546Sopenharmony_ci D3D10DDI_HSHADER hShader, D3D10DDI_HRTSHADER hRTShader, 89bf215546Sopenharmony_ci __in const D3D10DDIARG_STAGE_IO_SIGNATURES *pSignatures); 90bf215546Sopenharmony_ci 91bf215546Sopenharmony_civoid APIENTRY GsSetShader(D3D10DDI_HDEVICE hDevice, D3D10DDI_HSHADER hShader); 92bf215546Sopenharmony_ci 93bf215546Sopenharmony_civoid APIENTRY GsSetShaderResources( 94bf215546Sopenharmony_ci D3D10DDI_HDEVICE hDevice, UINT Offset, UINT NumViews, 95bf215546Sopenharmony_ci __in_ecount (NumViews) const D3D10DDI_HSHADERRESOURCEVIEW *phShaderResourceViews); 96bf215546Sopenharmony_ci 97bf215546Sopenharmony_civoid APIENTRY GsSetConstantBuffers(D3D10DDI_HDEVICE hDevice, UINT StartBuffer, UINT NumBuffers, 98bf215546Sopenharmony_ci __in_ecount (NumBuffers) const D3D10DDI_HRESOURCE *phBuffers); 99bf215546Sopenharmony_ci 100bf215546Sopenharmony_civoid APIENTRY GsSetSamplers(D3D10DDI_HDEVICE hDevice, UINT Offset, UINT NumSamplers, 101bf215546Sopenharmony_ci __in_ecount (NumSamplers) const D3D10DDI_HSAMPLER *phSamplers); 102bf215546Sopenharmony_ci 103bf215546Sopenharmony_ciSIZE_T APIENTRY CalcPrivateGeometryShaderWithStreamOutput( 104bf215546Sopenharmony_ci D3D10DDI_HDEVICE hDevice, 105bf215546Sopenharmony_ci __in const D3D10DDIARG_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT *pCreateGeometryShaderWithStreamOutput, 106bf215546Sopenharmony_ci __in const D3D10DDIARG_STAGE_IO_SIGNATURES *pSignatures); 107bf215546Sopenharmony_ci 108bf215546Sopenharmony_civoid APIENTRY CreateGeometryShaderWithStreamOutput( 109bf215546Sopenharmony_ci D3D10DDI_HDEVICE hDevice, 110bf215546Sopenharmony_ci __in const D3D10DDIARG_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT *pCreateGeometryShaderWithStreamOutput, 111bf215546Sopenharmony_ci D3D10DDI_HSHADER hShader, D3D10DDI_HRTSHADER hRTShader, 112bf215546Sopenharmony_ci __in const D3D10DDIARG_STAGE_IO_SIGNATURES *pSignatures); 113bf215546Sopenharmony_ci 114bf215546Sopenharmony_civoid APIENTRY SoSetTargets(D3D10DDI_HDEVICE hDevice, UINT SOTargets, UINT ClearTargets, 115bf215546Sopenharmony_ci __in_ecount (SOTargets) const D3D10DDI_HRESOURCE *phResource, 116bf215546Sopenharmony_ci __in_ecount (SOTargets) const UINT *pOffsets); 117bf215546Sopenharmony_ci 118bf215546Sopenharmony_civoid APIENTRY CreatePixelShader(D3D10DDI_HDEVICE hDevice, 119bf215546Sopenharmony_ci __in_ecount (pShaderCode[1]) const UINT *pCode, 120bf215546Sopenharmony_ci D3D10DDI_HSHADER hShader, D3D10DDI_HRTSHADER hRTShader, 121bf215546Sopenharmony_ci __in const D3D10DDIARG_STAGE_IO_SIGNATURES *pSignatures); 122bf215546Sopenharmony_civoid APIENTRY PsSetShader(D3D10DDI_HDEVICE hDevice, D3D10DDI_HSHADER hShader); 123bf215546Sopenharmony_ci 124bf215546Sopenharmony_civoid APIENTRY PsSetShaderResources( 125bf215546Sopenharmony_ci D3D10DDI_HDEVICE hDevice, UINT Offset, UINT NumViews, 126bf215546Sopenharmony_ci __in_ecount (NumViews) const D3D10DDI_HSHADERRESOURCEVIEW *phShaderResourceViews); 127bf215546Sopenharmony_ci 128bf215546Sopenharmony_civoid APIENTRY PsSetConstantBuffers(D3D10DDI_HDEVICE hDevice, UINT StartBuffer, UINT NumBuffers, 129bf215546Sopenharmony_ci __in_ecount (NumBuffers) const D3D10DDI_HRESOURCE *phBuffers); 130bf215546Sopenharmony_ci 131bf215546Sopenharmony_civoid APIENTRY PsSetSamplers(D3D10DDI_HDEVICE hDevice, UINT Offset, UINT NumSamplers, 132bf215546Sopenharmony_ci __in_ecount (NumSamplers) const D3D10DDI_HSAMPLER *phSamplers); 133bf215546Sopenharmony_ci 134bf215546Sopenharmony_civoid APIENTRY ShaderResourceViewReadAfterWriteHazard( 135bf215546Sopenharmony_ci D3D10DDI_HDEVICE hDevice, D3D10DDI_HSHADERRESOURCEVIEW hShaderResourceView, 136bf215546Sopenharmony_ci D3D10DDI_HRESOURCE hResource); 137bf215546Sopenharmony_ci 138bf215546Sopenharmony_ciSIZE_T APIENTRY CalcPrivateShaderResourceViewSize( 139bf215546Sopenharmony_ci D3D10DDI_HDEVICE hDevice, 140bf215546Sopenharmony_ci __in const D3D10DDIARG_CREATESHADERRESOURCEVIEW *pCreateShaderResourceView); 141bf215546Sopenharmony_ci 142bf215546Sopenharmony_civoid APIENTRY CreateShaderResourceView( 143bf215546Sopenharmony_ci D3D10DDI_HDEVICE hDevice, 144bf215546Sopenharmony_ci __in const D3D10DDIARG_CREATESHADERRESOURCEVIEW *pCreateShaderResourceView, 145bf215546Sopenharmony_ci D3D10DDI_HSHADERRESOURCEVIEW hShaderResourceView, 146bf215546Sopenharmony_ci D3D10DDI_HRTSHADERRESOURCEVIEW hRTShaderResourceView); 147bf215546Sopenharmony_ci 148bf215546Sopenharmony_ciSIZE_T APIENTRY CalcPrivateShaderResourceViewSize1( 149bf215546Sopenharmony_ci D3D10DDI_HDEVICE hDevice, 150bf215546Sopenharmony_ci __in const D3D10_1DDIARG_CREATESHADERRESOURCEVIEW *pCreateShaderResourceView); 151bf215546Sopenharmony_ci 152bf215546Sopenharmony_civoid APIENTRY CreateShaderResourceView1( 153bf215546Sopenharmony_ci D3D10DDI_HDEVICE hDevice, 154bf215546Sopenharmony_ci __in const D3D10_1DDIARG_CREATESHADERRESOURCEVIEW *pCreateShaderResourceView, 155bf215546Sopenharmony_ci D3D10DDI_HSHADERRESOURCEVIEW hShaderResourceView, 156bf215546Sopenharmony_ci D3D10DDI_HRTSHADERRESOURCEVIEW hRTShaderResourceView); 157bf215546Sopenharmony_ci 158bf215546Sopenharmony_civoid APIENTRY DestroyShaderResourceView(D3D10DDI_HDEVICE hDevice, 159bf215546Sopenharmony_ci D3D10DDI_HSHADERRESOURCEVIEW hShaderResourceView); 160bf215546Sopenharmony_ci 161bf215546Sopenharmony_civoid APIENTRY GenMips(D3D10DDI_HDEVICE hDevice, 162bf215546Sopenharmony_ci D3D10DDI_HSHADERRESOURCEVIEW hShaderResourceView); 163bf215546Sopenharmony_ci 164bf215546Sopenharmony_ci#endif /* SHADER_H */ 165