VirtualBox

source: vbox/trunk/src/libs/dxvk-native-1.9.2a/include/native/directx/d3d11shader.h@ 97780

Last change on this file since 97780 was 96497, checked in by vboxsync, 3 years ago

libs/dxvk-native-1.9.2a: export to OSE

  • Property svn:eol-style set to native
File size: 10.0 KB
Line 
1#undef INTERFACE
2/*
3 * Copyright 2010 Matteo Bruni for CodeWeavers
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20#ifndef __D3D11SHADER_H__
21#define __D3D11SHADER_H__
22
23#include "d3dcommon.h"
24
25/* These are defined as version-neutral in d3dcommon.h */
26typedef D3D_CBUFFER_TYPE D3D11_CBUFFER_TYPE;
27
28typedef D3D_RESOURCE_RETURN_TYPE D3D11_RESOURCE_RETURN_TYPE;
29
30typedef D3D_TESSELLATOR_DOMAIN D3D11_TESSELLATOR_DOMAIN;
31
32typedef D3D_TESSELLATOR_PARTITIONING D3D11_TESSELLATOR_PARTITIONING;
33
34typedef D3D_TESSELLATOR_OUTPUT_PRIMITIVE D3D11_TESSELLATOR_OUTPUT_PRIMITIVE;
35
36typedef struct _D3D11_SHADER_DESC
37{
38 UINT Version;
39 const char *Creator;
40 UINT Flags;
41 UINT ConstantBuffers;
42 UINT BoundResources;
43 UINT InputParameters;
44 UINT OutputParameters;
45 UINT InstructionCount;
46 UINT TempRegisterCount;
47 UINT TempArrayCount;
48 UINT DefCount;
49 UINT DclCount;
50 UINT TextureNormalInstructions;
51 UINT TextureLoadInstructions;
52 UINT TextureCompInstructions;
53 UINT TextureBiasInstructions;
54 UINT TextureGradientInstructions;
55 UINT FloatInstructionCount;
56 UINT IntInstructionCount;
57 UINT UintInstructionCount;
58 UINT StaticFlowControlCount;
59 UINT DynamicFlowControlCount;
60 UINT MacroInstructionCount;
61 UINT ArrayInstructionCount;
62 UINT CutInstructionCount;
63 UINT EmitInstructionCount;
64 D3D_PRIMITIVE_TOPOLOGY GSOutputTopology;
65 UINT GSMaxOutputVertexCount;
66 D3D_PRIMITIVE InputPrimitive;
67 UINT PatchConstantParameters;
68 UINT cGSInstanceCount;
69 UINT cControlPoints;
70 D3D_TESSELLATOR_OUTPUT_PRIMITIVE HSOutputPrimitive;
71 D3D_TESSELLATOR_PARTITIONING HSPartitioning;
72 D3D_TESSELLATOR_DOMAIN TessellatorDomain;
73 UINT cBarrierInstructions;
74 UINT cInterlockedInstructions;
75 UINT cTextureStoreInstructions;
76} D3D11_SHADER_DESC;
77
78typedef struct _D3D11_SHADER_VARIABLE_DESC
79{
80 const char *Name;
81 UINT StartOffset;
82 UINT Size;
83 UINT uFlags;
84 void *DefaultValue;
85 UINT StartTexture;
86 UINT TextureSize;
87 UINT StartSampler;
88 UINT SamplerSize;
89} D3D11_SHADER_VARIABLE_DESC;
90
91typedef struct _D3D11_SHADER_TYPE_DESC
92{
93 D3D_SHADER_VARIABLE_CLASS Class;
94 D3D_SHADER_VARIABLE_TYPE Type;
95 UINT Rows;
96 UINT Columns;
97 UINT Elements;
98 UINT Members;
99 UINT Offset;
100 const char *Name;
101} D3D11_SHADER_TYPE_DESC;
102
103typedef struct _D3D11_SHADER_BUFFER_DESC
104{
105 const char *Name;
106 D3D_CBUFFER_TYPE Type;
107 UINT Variables;
108 UINT Size;
109 UINT uFlags;
110} D3D11_SHADER_BUFFER_DESC;
111
112typedef struct _D3D11_SHADER_INPUT_BIND_DESC
113{
114 const char *Name;
115 D3D_SHADER_INPUT_TYPE Type;
116 UINT BindPoint;
117 UINT BindCount;
118 UINT uFlags;
119 D3D_RESOURCE_RETURN_TYPE ReturnType;
120 D3D_SRV_DIMENSION Dimension;
121 UINT NumSamples;
122} D3D11_SHADER_INPUT_BIND_DESC;
123
124typedef struct _D3D11_SIGNATURE_PARAMETER_DESC
125{
126 const char *SemanticName;
127 UINT SemanticIndex;
128 UINT Register;
129 D3D_NAME SystemValueType;
130 D3D_REGISTER_COMPONENT_TYPE ComponentType;
131 BYTE Mask;
132 BYTE ReadWriteMask;
133 UINT Stream;
134#if D3D_COMPILER_VERSION >= 46
135 D3D_MIN_PRECISION MinPrecision;
136#endif
137} D3D11_SIGNATURE_PARAMETER_DESC;
138
139DEFINE_GUID(IID_ID3D11ShaderReflectionType, 0x6e6ffa6a, 0x9bae, 0x4613, 0xa5, 0x1e, 0x91, 0x65, 0x2d, 0x50, 0x8c, 0x21);
140
141#define INTERFACE ID3D11ShaderReflectionType
142DECLARE_INTERFACE(ID3D11ShaderReflectionType)
143{
144 STDMETHOD(GetDesc)(THIS_ D3D11_SHADER_TYPE_DESC *desc) PURE;
145 STDMETHOD_(struct ID3D11ShaderReflectionType *, GetMemberTypeByIndex)(THIS_ UINT index) PURE;
146 STDMETHOD_(struct ID3D11ShaderReflectionType *, GetMemberTypeByName)(THIS_ const char *name) PURE;
147 STDMETHOD_(const char *, GetMemberTypeName)(THIS_ UINT index) PURE;
148 STDMETHOD(IsEqual)(THIS_ struct ID3D11ShaderReflectionType *type) PURE;
149 STDMETHOD_(struct ID3D11ShaderReflectionType *, GetSubType)(THIS) PURE;
150 STDMETHOD_(struct ID3D11ShaderReflectionType *, GetBaseClass)(THIS) PURE;
151 STDMETHOD_(UINT, GetNumInterfaces)(THIS) PURE;
152 STDMETHOD_(struct ID3D11ShaderReflectionType *, GetInterfaceByIndex)(THIS_ UINT index) PURE;
153 STDMETHOD(IsOfType)(THIS_ struct ID3D11ShaderReflectionType *type) PURE;
154 STDMETHOD(ImplementsInterface)(THIS_ ID3D11ShaderReflectionType *base) PURE;
155};
156#undef INTERFACE
157
158DEFINE_GUID(IID_ID3D11ShaderReflectionVariable, 0x51f23923, 0xf3e5, 0x4bd1, 0x91, 0xcb, 0x60, 0x61, 0x77, 0xd8, 0xdb, 0x4c);
159
160#define INTERFACE ID3D11ShaderReflectionVariable
161DECLARE_INTERFACE(ID3D11ShaderReflectionVariable)
162{
163 STDMETHOD(GetDesc)(THIS_ D3D11_SHADER_VARIABLE_DESC *desc) PURE;
164 STDMETHOD_(struct ID3D11ShaderReflectionType *, GetType)(THIS) PURE;
165 STDMETHOD_(struct ID3D11ShaderReflectionConstantBuffer *, GetBuffer)(THIS) PURE;
166 STDMETHOD_(UINT, GetInterfaceSlot)(THIS_ UINT index) PURE;
167};
168#undef INTERFACE
169
170DEFINE_GUID(IID_ID3D11ShaderReflectionConstantBuffer, 0xeb62d63d, 0x93dd, 0x4318, 0x8a, 0xe8, 0xc6, 0xf8, 0x3a, 0xd3, 0x71, 0xb8);
171
172#define INTERFACE ID3D11ShaderReflectionConstantBuffer
173DECLARE_INTERFACE(ID3D11ShaderReflectionConstantBuffer)
174{
175 STDMETHOD(GetDesc)(THIS_ D3D11_SHADER_BUFFER_DESC *desc) PURE;
176 STDMETHOD_(struct ID3D11ShaderReflectionVariable *, GetVariableByIndex)(THIS_ UINT index) PURE;
177 STDMETHOD_(struct ID3D11ShaderReflectionVariable *, GetVariableByName)(THIS_ const char *name) PURE;
178};
179#undef INTERFACE
180
181#if D3D_COMPILER_VERSION <= 42
182DEFINE_GUID(IID_ID3D11ShaderReflection, 0x17f27486, 0xa342, 0x4d10, 0x88, 0x42, 0xab, 0x08, 0x74, 0xe7, 0xf6, 0x70);
183#elif D3D_COMPILER_VERSION == 43
184DEFINE_GUID(IID_ID3D11ShaderReflection, 0x0a233719, 0x3960, 0x4578, 0x9d, 0x7c, 0x20, 0x3b, 0x8b, 0x1d, 0x9c, 0xc1);
185#else
186DEFINE_GUID(IID_ID3D11ShaderReflection, 0x8d536ca1, 0x0cca, 0x4956, 0xa8, 0x37, 0x78, 0x69, 0x63, 0x75, 0x55, 0x84);
187#endif
188
189#define INTERFACE ID3D11ShaderReflection
190DECLARE_INTERFACE_(ID3D11ShaderReflection, IUnknown)
191{
192 /* IUnknown methods */
193 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
194 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
195 STDMETHOD_(ULONG, Release)(THIS) PURE;
196 /* ID3D11ShaderReflection methods */
197 STDMETHOD(GetDesc)(THIS_ D3D11_SHADER_DESC *desc) PURE;
198 STDMETHOD_(struct ID3D11ShaderReflectionConstantBuffer *, GetConstantBufferByIndex)(THIS_ UINT index) PURE;
199 STDMETHOD_(struct ID3D11ShaderReflectionConstantBuffer *, GetConstantBufferByName)(THIS_ const char *name) PURE;
200 STDMETHOD(GetResourceBindingDesc)(THIS_ UINT index, D3D11_SHADER_INPUT_BIND_DESC *desc) PURE;
201 STDMETHOD(GetInputParameterDesc)(THIS_ UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc) PURE;
202 STDMETHOD(GetOutputParameterDesc)(THIS_ UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc) PURE;
203 STDMETHOD(GetPatchConstantParameterDesc)(THIS_ UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc) PURE;
204 STDMETHOD_(struct ID3D11ShaderReflectionVariable *, GetVariableByName)(THIS_ const char *name) PURE;
205 STDMETHOD(GetResourceBindingDescByName)(THIS_ const char *name, D3D11_SHADER_INPUT_BIND_DESC *desc) PURE;
206 STDMETHOD_(UINT, GetMovInstructionCount)(THIS) PURE;
207 STDMETHOD_(UINT, GetMovcInstructionCount)(THIS) PURE;
208 STDMETHOD_(UINT, GetConversionInstructionCount)(THIS) PURE;
209 STDMETHOD_(UINT, GetBitwiseInstructionCount)(THIS) PURE;
210 STDMETHOD_(D3D_PRIMITIVE, GetGSInputPrimitive)(THIS) PURE;
211 STDMETHOD_(WINBOOL, IsSampleFrequencyShader)(THIS) PURE;
212 STDMETHOD_(UINT, GetNumInterfaceSlots)(THIS) PURE;
213 STDMETHOD(GetMinFeatureLevel)(THIS_ enum D3D_FEATURE_LEVEL *level) PURE;
214 STDMETHOD_(UINT, GetThreadGroupSize)(THIS_ UINT *sizex, UINT *sizey, UINT *sizez) PURE;
215 STDMETHOD_(UINT64, GetRequiresFlags)(THIS) PURE;
216};
217#undef INTERFACE
218
219DEFINE_GUID(IID_ID3D11ModuleInstance, 0x469e07f7, 0x45a, 0x48d5, 0xaa, 0x12, 0x68, 0xa4, 0x78, 0xcd, 0xf7, 0x5d);
220
221#define INTERFACE ID3D11ModuleInstance
222DECLARE_INTERFACE_(ID3D11ModuleInstance, IUnknown)
223{
224 STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
225 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
226 STDMETHOD_(ULONG, Release)(THIS) PURE;
227
228 /* ID3D11ModuleInstance methods */
229 STDMETHOD(BindConstantBuffer)(THIS_ UINT srcslot, UINT dstslot, UINT dstoffset) PURE;
230 STDMETHOD(BindConstantBufferByName)(THIS_ const char *name, UINT dstslot, UINT dstoffset) PURE;
231
232 STDMETHOD(BindResource)(THIS_ UINT srcslot, UINT dstslot, UINT count) PURE;
233 STDMETHOD(BindResourceByName)(THIS_ const char *name, UINT dstslot, UINT count) PURE;
234
235 STDMETHOD(BindSampler)(THIS_ UINT srcslot, UINT dstslot, UINT count) PURE;
236 STDMETHOD(BindSamplerByName)(THIS_ const char *name, UINT dstslot, UINT count) PURE;
237
238 STDMETHOD(BindUnorderedAccessView)(THIS_ UINT srcslot, UINT dstslot, UINT count) PURE;
239 STDMETHOD(BindUnorderedAccessViewByName)(THIS_ const char *name, UINT dstslot, UINT count) PURE;
240
241 STDMETHOD(BindResourceAsUnorderedAccessView)(THIS_ UINT srcslot, UINT dstslot, UINT count) PURE;
242 STDMETHOD(BindResourceAsUnorderedAccessViewByName)(THIS_ const char *name, UINT dstslot, UINT count) PURE;
243};
244#undef INTERFACE
245
246DEFINE_GUID(IID_ID3D11Module, 0xcac701ee, 0x80fc, 0x4122, 0x82, 0x42, 0x10, 0xb3, 0x9c, 0x8c, 0xec, 0x34);
247
248#define INTERFACE ID3D11Module
249DECLARE_INTERFACE_(ID3D11Module, IUnknown)
250{
251 STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
252 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
253 STDMETHOD_(ULONG, Release)(THIS) PURE;
254
255 /* ID3D11Module methods */
256 STDMETHOD(CreateInstance)(THIS_ const char *instnamespace, ID3D11ModuleInstance **moduleinstance) PURE;
257};
258#undef INTERFACE
259
260#endif
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette