Path: blob/21.2-virgl/src/gallium/frontends/d3d10umd/Shader.h
4565 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* Shader.h --29* Functions that manipulate shader resources.30*/3132#ifndef SHADER_H33#define SHADER_H3435#include "DriverIncludes.h"3637struct Device;38struct Shader;3940void *41CreateEmptyShader(Device *pDevice,42enum pipe_shader_type processor);4344void45DeleteEmptyShader(Device *pDevice,46enum pipe_shader_type processor, void *handle);4748unsigned49ShaderFindOutputMapping(Shader *shader, unsigned registerIndex);5051SIZE_T APIENTRY52CalcPrivateShaderSize(D3D10DDI_HDEVICE hDevice,53__in_ecount (pShaderCode[1]) const UINT *pShaderCode,54__in const D3D10DDIARG_STAGE_IO_SIGNATURES *pSignatures);5556void APIENTRY57DestroyShader(D3D10DDI_HDEVICE hDevice, D3D10DDI_HSHADER hShader);5859SIZE_T APIENTRY60CalcPrivateSamplerSize(D3D10DDI_HDEVICE hDevice,61__in const D3D10_DDI_SAMPLER_DESC *pSamplerDesc);6263void APIENTRY CreateSampler(D3D10DDI_HDEVICE hDevice,64__in const D3D10_DDI_SAMPLER_DESC *pSamplerDesc,65D3D10DDI_HSAMPLER hSampler, D3D10DDI_HRTSAMPLER hRTSampler);6667void APIENTRY DestroySampler(D3D10DDI_HDEVICE hDevice, D3D10DDI_HSAMPLER hSampler);6869void APIENTRY CreateVertexShader(D3D10DDI_HDEVICE hDevice,70__in_ecount (pShaderCode[1]) const UINT *pCode,71D3D10DDI_HSHADER hShader, D3D10DDI_HRTSHADER hRTShader,72__in const D3D10DDIARG_STAGE_IO_SIGNATURES *pSignatures);7374void APIENTRY VsSetShader(D3D10DDI_HDEVICE hDevice, D3D10DDI_HSHADER hShader);7576void APIENTRY VsSetShaderResources(77D3D10DDI_HDEVICE hDevice, UINT Offset, UINT NumViews,78__in_ecount (NumViews) const D3D10DDI_HSHADERRESOURCEVIEW *phShaderResourceViews);79void APIENTRY VsSetConstantBuffers(D3D10DDI_HDEVICE hDevice, UINT StartBuffer, UINT NumBuffers,80__in_ecount (NumBuffers) const D3D10DDI_HRESOURCE *phBuffers);8182void APIENTRY VsSetSamplers(D3D10DDI_HDEVICE hDevice, UINT Offset, UINT NumSamplers,83__in_ecount (NumSamplers) const D3D10DDI_HSAMPLER *phSamplers);8485void APIENTRY CreateGeometryShader(D3D10DDI_HDEVICE hDevice,86__in_ecount (pShaderCode[1]) const UINT *pCode,87D3D10DDI_HSHADER hShader, D3D10DDI_HRTSHADER hRTShader,88__in const D3D10DDIARG_STAGE_IO_SIGNATURES *pSignatures);8990void APIENTRY GsSetShader(D3D10DDI_HDEVICE hDevice, D3D10DDI_HSHADER hShader);9192void APIENTRY GsSetShaderResources(93D3D10DDI_HDEVICE hDevice, UINT Offset, UINT NumViews,94__in_ecount (NumViews) const D3D10DDI_HSHADERRESOURCEVIEW *phShaderResourceViews);9596void APIENTRY GsSetConstantBuffers(D3D10DDI_HDEVICE hDevice, UINT StartBuffer, UINT NumBuffers,97__in_ecount (NumBuffers) const D3D10DDI_HRESOURCE *phBuffers);9899void APIENTRY GsSetSamplers(D3D10DDI_HDEVICE hDevice, UINT Offset, UINT NumSamplers,100__in_ecount (NumSamplers) const D3D10DDI_HSAMPLER *phSamplers);101102SIZE_T APIENTRY CalcPrivateGeometryShaderWithStreamOutput(103D3D10DDI_HDEVICE hDevice,104__in const D3D10DDIARG_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT *pCreateGeometryShaderWithStreamOutput,105__in const D3D10DDIARG_STAGE_IO_SIGNATURES *pSignatures);106107void APIENTRY CreateGeometryShaderWithStreamOutput(108D3D10DDI_HDEVICE hDevice,109__in const D3D10DDIARG_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT *pCreateGeometryShaderWithStreamOutput,110D3D10DDI_HSHADER hShader, D3D10DDI_HRTSHADER hRTShader,111__in const D3D10DDIARG_STAGE_IO_SIGNATURES *pSignatures);112113void APIENTRY SoSetTargets(D3D10DDI_HDEVICE hDevice, UINT SOTargets, UINT ClearTargets,114__in_ecount (SOTargets) const D3D10DDI_HRESOURCE *phResource,115__in_ecount (SOTargets) const UINT *pOffsets);116117void APIENTRY CreatePixelShader(D3D10DDI_HDEVICE hDevice,118__in_ecount (pShaderCode[1]) const UINT *pCode,119D3D10DDI_HSHADER hShader, D3D10DDI_HRTSHADER hRTShader,120__in const D3D10DDIARG_STAGE_IO_SIGNATURES *pSignatures);121void APIENTRY PsSetShader(D3D10DDI_HDEVICE hDevice, D3D10DDI_HSHADER hShader);122123void APIENTRY PsSetShaderResources(124D3D10DDI_HDEVICE hDevice, UINT Offset, UINT NumViews,125__in_ecount (NumViews) const D3D10DDI_HSHADERRESOURCEVIEW *phShaderResourceViews);126127void APIENTRY PsSetConstantBuffers(D3D10DDI_HDEVICE hDevice, UINT StartBuffer, UINT NumBuffers,128__in_ecount (NumBuffers) const D3D10DDI_HRESOURCE *phBuffers);129130void APIENTRY PsSetSamplers(D3D10DDI_HDEVICE hDevice, UINT Offset, UINT NumSamplers,131__in_ecount (NumSamplers) const D3D10DDI_HSAMPLER *phSamplers);132133void APIENTRY ShaderResourceViewReadAfterWriteHazard(134D3D10DDI_HDEVICE hDevice, D3D10DDI_HSHADERRESOURCEVIEW hShaderResourceView,135D3D10DDI_HRESOURCE hResource);136137SIZE_T APIENTRY CalcPrivateShaderResourceViewSize(138D3D10DDI_HDEVICE hDevice,139__in const D3D10DDIARG_CREATESHADERRESOURCEVIEW *pCreateShaderResourceView);140141void APIENTRY CreateShaderResourceView(142D3D10DDI_HDEVICE hDevice,143__in const D3D10DDIARG_CREATESHADERRESOURCEVIEW *pCreateShaderResourceView,144D3D10DDI_HSHADERRESOURCEVIEW hShaderResourceView,145D3D10DDI_HRTSHADERRESOURCEVIEW hRTShaderResourceView);146147SIZE_T APIENTRY CalcPrivateShaderResourceViewSize1(148D3D10DDI_HDEVICE hDevice,149__in const D3D10_1DDIARG_CREATESHADERRESOURCEVIEW *pCreateShaderResourceView);150151void APIENTRY CreateShaderResourceView1(152D3D10DDI_HDEVICE hDevice,153__in const D3D10_1DDIARG_CREATESHADERRESOURCEVIEW *pCreateShaderResourceView,154D3D10DDI_HSHADERRESOURCEVIEW hShaderResourceView,155D3D10DDI_HRTSHADERRESOURCEVIEW hRTShaderResourceView);156157void APIENTRY DestroyShaderResourceView(D3D10DDI_HDEVICE hDevice,158D3D10DDI_HSHADERRESOURCEVIEW hShaderResourceView);159160void APIENTRY GenMips(D3D10DDI_HDEVICE hDevice,161D3D10DDI_HSHADERRESOURCEVIEW hShaderResourceView);162163#endif /* SHADER_H */164165166