1 /**************************************************************************
2  *
3  * Copyright 2012-2021 VMware, Inc.
4  * All Rights Reserved.
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a
7  * copy of this software and associated documentation files (the
8  * "Software"), to deal in the Software without restriction, including
9  * without limitation the rights to use, copy, modify, merge, publish,
10  * distribute, sub license, and/or sell copies of the Software, and to
11  * permit persons to whom the Software is furnished to do so, subject to
12  * the following conditions:
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17  * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
18  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20  * USE OR OTHER DEALINGS IN THE SOFTWARE.
21  *
22  * The above copyright notice and this permission notice (including the
23  * next paragraph) shall be included in all copies or substantial portions
24  * of the Software.
25  *
26  **************************************************************************/
27 
28 /*
29  * OutputMerger.h --
30  *    Functions that manipulate the output merger state.
31  */
32 
33 #ifndef OUTPUT_MERGER_H
34 #define OUTPUT_MERGER_H
35 
36 #include "DriverIncludes.h"
37 
38 SIZE_T APIENTRY CalcPrivateRenderTargetViewSize(
39    D3D10DDI_HDEVICE hDevice,
40    __in const D3D10DDIARG_CREATERENDERTARGETVIEW *pCreateRenderTargetView);
41 
42 void APIENTRY CreateRenderTargetView(
43    D3D10DDI_HDEVICE hDevice,
44    __in const D3D10DDIARG_CREATERENDERTARGETVIEW *pCreateRenderTargetView,
45    D3D10DDI_HRENDERTARGETVIEW hRenderTargetView,
46    D3D10DDI_HRTRENDERTARGETVIEW hRTRenderTargetView);
47 
48 void APIENTRY DestroyRenderTargetView(D3D10DDI_HDEVICE hDevice,
49                              D3D10DDI_HRENDERTARGETVIEW hRenderTargetView);
50 
51 void APIENTRY ClearRenderTargetView(D3D10DDI_HDEVICE hDevice,
52                            D3D10DDI_HRENDERTARGETVIEW hRenderTargetView,
53                            FLOAT pColorRGBA[4]);
54 
55 SIZE_T APIENTRY CalcPrivateDepthStencilViewSize(
56    D3D10DDI_HDEVICE hDevice,
57    __in const D3D10DDIARG_CREATEDEPTHSTENCILVIEW *pCreateDepthStencilView);
58 
59 void APIENTRY CreateDepthStencilView(
60    D3D10DDI_HDEVICE hDevice,
61    __in const D3D10DDIARG_CREATEDEPTHSTENCILVIEW *pCreateDepthStencilView,
62    D3D10DDI_HDEPTHSTENCILVIEW hDepthStencilView,
63    D3D10DDI_HRTDEPTHSTENCILVIEW hRTDepthStencilView);
64 
65 void APIENTRY DestroyDepthStencilView(D3D10DDI_HDEVICE hDevice,
66                              D3D10DDI_HDEPTHSTENCILVIEW hDepthStencilView);
67 
68 void APIENTRY ClearDepthStencilView(D3D10DDI_HDEVICE hDevice,
69                            D3D10DDI_HDEPTHSTENCILVIEW hDepthStencilView,
70                            UINT Flags, FLOAT Depth, UINT8 Stencil);
71 
72 SIZE_T APIENTRY CalcPrivateBlendStateSize(D3D10DDI_HDEVICE hDevice,
73                                  __in const D3D10_DDI_BLEND_DESC *pBlendDesc);
74 
75 SIZE_T APIENTRY CalcPrivateBlendStateSize1(D3D10DDI_HDEVICE hDevice,
76                                  __in const D3D10_1_DDI_BLEND_DESC *pBlendDesc);
77 
78 void APIENTRY CreateBlendState(D3D10DDI_HDEVICE hDevice,
79                       __in const D3D10_DDI_BLEND_DESC *pBlendDesc,
80                       D3D10DDI_HBLENDSTATE hBlendState,
81                       D3D10DDI_HRTBLENDSTATE hRTBlendState);
82 
83 void APIENTRY CreateBlendState1(D3D10DDI_HDEVICE hDevice,
84                       __in const D3D10_1_DDI_BLEND_DESC *pBlendDesc,
85                       D3D10DDI_HBLENDSTATE hBlendState,
86                       D3D10DDI_HRTBLENDSTATE hRTBlendState);
87 
88 void APIENTRY DestroyBlendState(D3D10DDI_HDEVICE hDevice, D3D10DDI_HBLENDSTATE hBlendState);
89 
90 void APIENTRY SetBlendState(D3D10DDI_HDEVICE hDevice, D3D10DDI_HBLENDSTATE hState,
91                    const FLOAT pBlendFactor[4], UINT SampleMask);
92 
93 void APIENTRY SetRenderTargets(
94    D3D10DDI_HDEVICE hDevice,
95    __in_ecount (NumViews) const D3D10DDI_HRENDERTARGETVIEW *phRenderTargetView,
96    UINT RTargets, UINT ClearTargets, D3D10DDI_HDEPTHSTENCILVIEW hDepthStencilView);
97 
98 SIZE_T APIENTRY CalcPrivateDepthStencilStateSize(
99    D3D10DDI_HDEVICE hDevice,
100    __in const D3D10_DDI_DEPTH_STENCIL_DESC *pDepthStencilDesc);
101 
102 void APIENTRY CreateDepthStencilState(
103    D3D10DDI_HDEVICE hDevice,
104    __in const D3D10_DDI_DEPTH_STENCIL_DESC *pDepthStencilDesc,
105    D3D10DDI_HDEPTHSTENCILSTATE hDepthStencilState,
106    D3D10DDI_HRTDEPTHSTENCILSTATE hRTDepthStencilState);
107 
108 void APIENTRY DestroyDepthStencilState(D3D10DDI_HDEVICE hDevice,
109                               D3D10DDI_HDEPTHSTENCILSTATE hDepthStencilState);
110 
111 void APIENTRY SetDepthStencilState(D3D10DDI_HDEVICE hDevice,
112                           D3D10DDI_HDEPTHSTENCILSTATE hState, UINT StencilRef);
113 
114 #endif   /* OUTPUT_MERGER_H */
115