17ec681f3Smrg/************************************************************************** 27ec681f3Smrg * 37ec681f3Smrg * Copyright 2012-2021 VMware, Inc. 47ec681f3Smrg * All Rights Reserved. 57ec681f3Smrg * 67ec681f3Smrg * Permission is hereby granted, free of charge, to any person obtaining a 77ec681f3Smrg * copy of this software and associated documentation files (the 87ec681f3Smrg * "Software"), to deal in the Software without restriction, including 97ec681f3Smrg * without limitation the rights to use, copy, modify, merge, publish, 107ec681f3Smrg * distribute, sub license, and/or sell copies of the Software, and to 117ec681f3Smrg * permit persons to whom the Software is furnished to do so, subject to 127ec681f3Smrg * the following conditions: 137ec681f3Smrg * 147ec681f3Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 157ec681f3Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 167ec681f3Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 177ec681f3Smrg * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, 187ec681f3Smrg * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 197ec681f3Smrg * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 207ec681f3Smrg * USE OR OTHER DEALINGS IN THE SOFTWARE. 217ec681f3Smrg * 227ec681f3Smrg * The above copyright notice and this permission notice (including the 237ec681f3Smrg * next paragraph) shall be included in all copies or substantial portions 247ec681f3Smrg * of the Software. 257ec681f3Smrg * 267ec681f3Smrg **************************************************************************/ 277ec681f3Smrg 287ec681f3Smrg/* 297ec681f3Smrg * Shader.h -- 307ec681f3Smrg * Functions that manipulate shader resources. 317ec681f3Smrg */ 327ec681f3Smrg 337ec681f3Smrg#ifndef SHADER_H 347ec681f3Smrg#define SHADER_H 357ec681f3Smrg 367ec681f3Smrg#include "DriverIncludes.h" 377ec681f3Smrg 387ec681f3Smrgstruct Device; 397ec681f3Smrgstruct Shader; 407ec681f3Smrg 417ec681f3Smrgvoid * 427ec681f3SmrgCreateEmptyShader(Device *pDevice, 437ec681f3Smrg enum pipe_shader_type processor); 447ec681f3Smrg 457ec681f3Smrgvoid 467ec681f3SmrgDeleteEmptyShader(Device *pDevice, 477ec681f3Smrg enum pipe_shader_type processor, void *handle); 487ec681f3Smrg 497ec681f3Smrgunsigned 507ec681f3SmrgShaderFindOutputMapping(Shader *shader, unsigned registerIndex); 517ec681f3Smrg 527ec681f3SmrgSIZE_T APIENTRY 537ec681f3SmrgCalcPrivateShaderSize(D3D10DDI_HDEVICE hDevice, 547ec681f3Smrg __in_ecount (pShaderCode[1]) const UINT *pShaderCode, 557ec681f3Smrg __in const D3D10DDIARG_STAGE_IO_SIGNATURES *pSignatures); 567ec681f3Smrg 577ec681f3Smrgvoid APIENTRY 587ec681f3SmrgDestroyShader(D3D10DDI_HDEVICE hDevice, D3D10DDI_HSHADER hShader); 597ec681f3Smrg 607ec681f3SmrgSIZE_T APIENTRY 617ec681f3SmrgCalcPrivateSamplerSize(D3D10DDI_HDEVICE hDevice, 627ec681f3Smrg __in const D3D10_DDI_SAMPLER_DESC *pSamplerDesc); 637ec681f3Smrg 647ec681f3Smrgvoid APIENTRY CreateSampler(D3D10DDI_HDEVICE hDevice, 657ec681f3Smrg __in const D3D10_DDI_SAMPLER_DESC *pSamplerDesc, 667ec681f3Smrg D3D10DDI_HSAMPLER hSampler, D3D10DDI_HRTSAMPLER hRTSampler); 677ec681f3Smrg 687ec681f3Smrgvoid APIENTRY DestroySampler(D3D10DDI_HDEVICE hDevice, D3D10DDI_HSAMPLER hSampler); 697ec681f3Smrg 707ec681f3Smrgvoid APIENTRY CreateVertexShader(D3D10DDI_HDEVICE hDevice, 717ec681f3Smrg __in_ecount (pShaderCode[1]) const UINT *pCode, 727ec681f3Smrg D3D10DDI_HSHADER hShader, D3D10DDI_HRTSHADER hRTShader, 737ec681f3Smrg __in const D3D10DDIARG_STAGE_IO_SIGNATURES *pSignatures); 747ec681f3Smrg 757ec681f3Smrgvoid APIENTRY VsSetShader(D3D10DDI_HDEVICE hDevice, D3D10DDI_HSHADER hShader); 767ec681f3Smrg 777ec681f3Smrgvoid APIENTRY VsSetShaderResources( 787ec681f3Smrg D3D10DDI_HDEVICE hDevice, UINT Offset, UINT NumViews, 797ec681f3Smrg __in_ecount (NumViews) const D3D10DDI_HSHADERRESOURCEVIEW *phShaderResourceViews); 807ec681f3Smrgvoid APIENTRY VsSetConstantBuffers(D3D10DDI_HDEVICE hDevice, UINT StartBuffer, UINT NumBuffers, 817ec681f3Smrg __in_ecount (NumBuffers) const D3D10DDI_HRESOURCE *phBuffers); 827ec681f3Smrg 837ec681f3Smrgvoid APIENTRY VsSetSamplers(D3D10DDI_HDEVICE hDevice, UINT Offset, UINT NumSamplers, 847ec681f3Smrg __in_ecount (NumSamplers) const D3D10DDI_HSAMPLER *phSamplers); 857ec681f3Smrg 867ec681f3Smrgvoid APIENTRY CreateGeometryShader(D3D10DDI_HDEVICE hDevice, 877ec681f3Smrg __in_ecount (pShaderCode[1]) const UINT *pCode, 887ec681f3Smrg D3D10DDI_HSHADER hShader, D3D10DDI_HRTSHADER hRTShader, 897ec681f3Smrg __in const D3D10DDIARG_STAGE_IO_SIGNATURES *pSignatures); 907ec681f3Smrg 917ec681f3Smrgvoid APIENTRY GsSetShader(D3D10DDI_HDEVICE hDevice, D3D10DDI_HSHADER hShader); 927ec681f3Smrg 937ec681f3Smrgvoid APIENTRY GsSetShaderResources( 947ec681f3Smrg D3D10DDI_HDEVICE hDevice, UINT Offset, UINT NumViews, 957ec681f3Smrg __in_ecount (NumViews) const D3D10DDI_HSHADERRESOURCEVIEW *phShaderResourceViews); 967ec681f3Smrg 977ec681f3Smrgvoid APIENTRY GsSetConstantBuffers(D3D10DDI_HDEVICE hDevice, UINT StartBuffer, UINT NumBuffers, 987ec681f3Smrg __in_ecount (NumBuffers) const D3D10DDI_HRESOURCE *phBuffers); 997ec681f3Smrg 1007ec681f3Smrgvoid APIENTRY GsSetSamplers(D3D10DDI_HDEVICE hDevice, UINT Offset, UINT NumSamplers, 1017ec681f3Smrg __in_ecount (NumSamplers) const D3D10DDI_HSAMPLER *phSamplers); 1027ec681f3Smrg 1037ec681f3SmrgSIZE_T APIENTRY CalcPrivateGeometryShaderWithStreamOutput( 1047ec681f3Smrg D3D10DDI_HDEVICE hDevice, 1057ec681f3Smrg __in const D3D10DDIARG_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT *pCreateGeometryShaderWithStreamOutput, 1067ec681f3Smrg __in const D3D10DDIARG_STAGE_IO_SIGNATURES *pSignatures); 1077ec681f3Smrg 1087ec681f3Smrgvoid APIENTRY CreateGeometryShaderWithStreamOutput( 1097ec681f3Smrg D3D10DDI_HDEVICE hDevice, 1107ec681f3Smrg __in const D3D10DDIARG_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT *pCreateGeometryShaderWithStreamOutput, 1117ec681f3Smrg D3D10DDI_HSHADER hShader, D3D10DDI_HRTSHADER hRTShader, 1127ec681f3Smrg __in const D3D10DDIARG_STAGE_IO_SIGNATURES *pSignatures); 1137ec681f3Smrg 1147ec681f3Smrgvoid APIENTRY SoSetTargets(D3D10DDI_HDEVICE hDevice, UINT SOTargets, UINT ClearTargets, 1157ec681f3Smrg __in_ecount (SOTargets) const D3D10DDI_HRESOURCE *phResource, 1167ec681f3Smrg __in_ecount (SOTargets) const UINT *pOffsets); 1177ec681f3Smrg 1187ec681f3Smrgvoid APIENTRY CreatePixelShader(D3D10DDI_HDEVICE hDevice, 1197ec681f3Smrg __in_ecount (pShaderCode[1]) const UINT *pCode, 1207ec681f3Smrg D3D10DDI_HSHADER hShader, D3D10DDI_HRTSHADER hRTShader, 1217ec681f3Smrg __in const D3D10DDIARG_STAGE_IO_SIGNATURES *pSignatures); 1227ec681f3Smrgvoid APIENTRY PsSetShader(D3D10DDI_HDEVICE hDevice, D3D10DDI_HSHADER hShader); 1237ec681f3Smrg 1247ec681f3Smrgvoid APIENTRY PsSetShaderResources( 1257ec681f3Smrg D3D10DDI_HDEVICE hDevice, UINT Offset, UINT NumViews, 1267ec681f3Smrg __in_ecount (NumViews) const D3D10DDI_HSHADERRESOURCEVIEW *phShaderResourceViews); 1277ec681f3Smrg 1287ec681f3Smrgvoid APIENTRY PsSetConstantBuffers(D3D10DDI_HDEVICE hDevice, UINT StartBuffer, UINT NumBuffers, 1297ec681f3Smrg __in_ecount (NumBuffers) const D3D10DDI_HRESOURCE *phBuffers); 1307ec681f3Smrg 1317ec681f3Smrgvoid APIENTRY PsSetSamplers(D3D10DDI_HDEVICE hDevice, UINT Offset, UINT NumSamplers, 1327ec681f3Smrg __in_ecount (NumSamplers) const D3D10DDI_HSAMPLER *phSamplers); 1337ec681f3Smrg 1347ec681f3Smrgvoid APIENTRY ShaderResourceViewReadAfterWriteHazard( 1357ec681f3Smrg D3D10DDI_HDEVICE hDevice, D3D10DDI_HSHADERRESOURCEVIEW hShaderResourceView, 1367ec681f3Smrg D3D10DDI_HRESOURCE hResource); 1377ec681f3Smrg 1387ec681f3SmrgSIZE_T APIENTRY CalcPrivateShaderResourceViewSize( 1397ec681f3Smrg D3D10DDI_HDEVICE hDevice, 1407ec681f3Smrg __in const D3D10DDIARG_CREATESHADERRESOURCEVIEW *pCreateShaderResourceView); 1417ec681f3Smrg 1427ec681f3Smrgvoid APIENTRY CreateShaderResourceView( 1437ec681f3Smrg D3D10DDI_HDEVICE hDevice, 1447ec681f3Smrg __in const D3D10DDIARG_CREATESHADERRESOURCEVIEW *pCreateShaderResourceView, 1457ec681f3Smrg D3D10DDI_HSHADERRESOURCEVIEW hShaderResourceView, 1467ec681f3Smrg D3D10DDI_HRTSHADERRESOURCEVIEW hRTShaderResourceView); 1477ec681f3Smrg 1487ec681f3SmrgSIZE_T APIENTRY CalcPrivateShaderResourceViewSize1( 1497ec681f3Smrg D3D10DDI_HDEVICE hDevice, 1507ec681f3Smrg __in const D3D10_1DDIARG_CREATESHADERRESOURCEVIEW *pCreateShaderResourceView); 1517ec681f3Smrg 1527ec681f3Smrgvoid APIENTRY CreateShaderResourceView1( 1537ec681f3Smrg D3D10DDI_HDEVICE hDevice, 1547ec681f3Smrg __in const D3D10_1DDIARG_CREATESHADERRESOURCEVIEW *pCreateShaderResourceView, 1557ec681f3Smrg D3D10DDI_HSHADERRESOURCEVIEW hShaderResourceView, 1567ec681f3Smrg D3D10DDI_HRTSHADERRESOURCEVIEW hRTShaderResourceView); 1577ec681f3Smrg 1587ec681f3Smrgvoid APIENTRY DestroyShaderResourceView(D3D10DDI_HDEVICE hDevice, 1597ec681f3Smrg D3D10DDI_HSHADERRESOURCEVIEW hShaderResourceView); 1607ec681f3Smrg 1617ec681f3Smrgvoid APIENTRY GenMips(D3D10DDI_HDEVICE hDevice, 1627ec681f3Smrg D3D10DDI_HSHADERRESOURCEVIEW hShaderResourceView); 1637ec681f3Smrg 1647ec681f3Smrg#endif /* SHADER_H */ 165