diff --git a/src/Generator/ApiData.cs b/src/Generator/ApiData.cs index 083e53c..ae51d64 100644 --- a/src/Generator/ApiData.cs +++ b/src/Generator/ApiData.cs @@ -61,6 +61,8 @@ public class ApiFunction public string Name { get; set; } public bool SetLastError { get; set; } public ApiDataType ReturnType { get; set; } + public List ReturnAttrs { get; set; } + public IList Params { get; set; } = new List(); public List Attrs { get; set; } @@ -97,6 +99,7 @@ public class ApiType { public string Name { get; set; } public string Kind { get; set; } + public List Attrs { get; set; } // Enum public bool Flags { get; set; } @@ -113,6 +116,12 @@ public class ApiType public string Guid { get; set; } public ApiDataType Interface { get; set; } public IList Methods { get; set; } = new List(); + + // Function + public bool SetLastError { get; set; } + public ApiDataType ReturnType { get; set; } + public List ReturnAttrs { get; set; } + public IList Params { get; set; } = new List(); } public sealed class ApiData diff --git a/src/Generator/DocGenerator.cs b/src/Generator/DocGenerator.cs index 9731034..0d9fcc5 100644 --- a/src/Generator/DocGenerator.cs +++ b/src/Generator/DocGenerator.cs @@ -6,6 +6,7 @@ using System.Text.RegularExpressions; using System.Xml; using MessagePack; using Microsoft.Windows.SDK.Win32Docs; +using Newtonsoft.Json.Linq; namespace Generator; @@ -33,6 +34,21 @@ public static class DocGenerator { if (key.StartsWith(prefix) || key.StartsWith("I" + prefix)) { + if (prefix == "D3D") + { + if (key.StartsWith("D3D10") || + key.StartsWith("D3D11") || + key.StartsWith("D3DX11") || + key.StartsWith("D3D12") || + key.StartsWith("ID3D10") || + key.StartsWith("ID3D11") || + key.StartsWith("ID3D12") || + key.StartsWith("ID3DX")) + { + continue; + } + } + documentationData.Add(key, data[key]); } } diff --git a/src/Generator/Program.cs b/src/Generator/Program.cs index 00ce5eb..da2068e 100644 --- a/src/Generator/Program.cs +++ b/src/Generator/Program.cs @@ -86,6 +86,14 @@ public static class Program { "D3D_TESSELLATOR_OUTPUT_PRIMITIVE", "D3D_TESSELLATOR_OUTPUT" }, { "D3D_REGISTER_COMPONENT_TYPE", "D3D_REGISTER_COMPONENT" }, { "D3D_RESOURCE_RETURN_TYPE", "D3D_RETURN_TYPE" }, + { "D3D_CBUFFER_TYPE", "D3D_CT" }, + { "D3D_INCLUDE_TYPE", "D3D_INCLUDE" }, + { "D3D_SHADER_VARIABLE_CLASS", "D3D_SVC" }, + { "D3D_SHADER_VARIABLE_FLAGS", "D3D_SVF" }, + { "D3D_SHADER_VARIABLE_TYPE", "D3D_SVT" }, + { "D3D_SHADER_INPUT_FLAGS", "D3D_SIF" }, + { "D3D_SHADER_INPUT_TYPE", "D3D_SIT" }, + { "D3D_SHADER_CBUFFER_FLAGS", "D3D_CBF" }, }; private static readonly Dictionary s_partRenames = new() @@ -98,6 +106,8 @@ public static class Program { "TRIANGLESTRIP", "TriangleStrip" }, { "PATCHLIST", "PatchList" }, + { "CBUFFER", "CBuffer" }, + { "TBUFFER", "TBuffer" }, { "NOPERSPECTIVE", "NoPerspective" }, { "TEXTURE1D", "Texture1D" }, { "TEXTURE1DARRAY", "Texture1DArray" }, @@ -108,7 +118,43 @@ public static class Program { "TEXTURE3D", "Texture3D" }, { "TEXTURECUBE", "TextureCube" }, { "TEXTURECUBEARRAY", "TextureCubeArray" }, + { "RWTEXTURE1D", "RwTexture1D" }, + { "RWTEXTURE1DARRAY", "RwTexture1DArray" }, + { "RWTEXTURE2D", "RwTexture2D" }, + { "RWTEXTURE2DARRAY", "RwTexture2DArray" }, + { "RWTEXTURE3D", "RwTexture3D" }, + { "RWBUFFER", "RwBuffer" }, { "BUFFEREX", "BufferExtended" }, + { "USERPACKED", "UserPacked" }, + { "SAMPLER1D", "Sampler1D" }, + { "SAMPLER2D", "Sampler2D" }, + { "SAMPLER3D", "Sampler3D" }, + { "SAMPLERCUBE", "SamplerCube" }, + { "RWTYPED", "RwTyped" }, + { "RWSTRUCTURED", "RwStructured" }, + { "BYTEADDRESS", "ByteAddress" }, + { "RWBYTEADDRESS", "RwByteAddress" }, + { "RTACCELERATIONSTRUCTURE", "RtAccelerationStructure" }, + { "FEEDBACKTEXTURE", "FeedbackTexture" }, + { "TESSFACTOR", "TessFactor" }, + { "SHADINGRATE", "ShadingRate" }, + { "CULLPRIMITIVE", "CullPrimitive" }, + { "VERTEXSHADER", "VertexShader" }, + { "PIXELSHADER", "PixelShader" }, + { "VERTEXFRAGMENT", "VertexFragment" }, + { "PIXELFRAGMENT", "PixelFragment" }, + { "GEOMETRYSHADER", "GeometryShader" }, + { "DOMAINSHADER", "DomainShader" }, + { "COMPUTESHADER", "ComputeShader" }, + { "DEPTHSTENCIL", "DepthStencil" }, + { "RENDERTARGETVIEW", "RenderTargetView" }, + { "DEPTHSTENCILVIEW", "DepthStencilView" }, + { "MIN8FLOAT", "Min8Float" }, + { "MIN10FLOAT", "Min10Float" }, + { "MIN16FLOAT", "Min16Float" }, + { "MIN12INT", "Min12Int" }, + { "MIN16INT", "Min16Int" }, + { "MIN16UINT", "Min16Uint" }, }; private static readonly Dictionary s_knownEnumValueNames = new() @@ -198,8 +244,8 @@ public static class Program } // Generate docs + DocGenerator.Generate(new[] { "D3D" }, Path.Combine(outputPath, "Direct3D.xml")); DocGenerator.Generate(new[] { "DXGI" }, Path.Combine(outputPath, "Dxgi.xml")); - //DocGenerator.Generate(new[] { "D3D" }, Path.Combine(outputPath, "Direct3D.xml")); DocGenerator.Generate(new[] { "D3D11" }, Path.Combine(outputPath, "D3D11.xml")); return 0; } @@ -409,15 +455,17 @@ public static class Program if (s_generateUnmanagedDocs) writer.WriteLine($"/// {enumType.Name}"); - if (enumType.Flags) + bool isFlags = false; + if (enumType.Flags || csTypeName.EndsWith("Flags")) { + isFlags = true; writer.WriteLine("[Flags]"); } bool noneAdded = false; using (writer.PushBlock($"public enum {csTypeName} : {baseTypeName}")) { - if (enumType.Flags && + if (isFlags && !enumType.Values.Any(item => GetPrettyFieldName(item.Name, enumPrefix) == "None")) { writer.WriteLine("None = 0,"); @@ -432,11 +480,12 @@ public static class Program continue; } - // Ignore D3D10 and D3D11 in D3D + // Ignore D3D10, D3D11 and D3D12 in D3D if (enumType.Name.StartsWith("D3D_")) { if (value.Name.StartsWith("D3D10_") || - value.Name.StartsWith("D3D11_")) + value.Name.StartsWith("D3D11_") || + value.Name.StartsWith("D3D12_")) { continue; } @@ -444,7 +493,7 @@ public static class Program string enumValueName = GetPrettyFieldName(value.Name, enumPrefix); - if (enumType.Name == "D3D_PRIMITIVE_TOPOLOGY") + if (enumType.Name == "D3D_SHADER_VARIABLE_TYPE") { } @@ -568,7 +617,6 @@ public static class Program writer.WriteLine(); } } - writer.WriteLine(); } @@ -728,10 +776,13 @@ public static class Program foreach (var parameter in method.Params) { bool asPointer = false; + string parameterType = default; if (parameter.Type.Kind == "ApiRef") { if (parameter.Type.TargetKind == "FunctionPointer") { + var functionType = api.Types.First(item => item.Name == parameter.Type.Name && item.Kind == "FunctionPointer"); + parameterType = "delegate* unmanaged[Stdcall]"; } else { @@ -743,7 +794,11 @@ public static class Program } } - string parameterType = GetTypeName(parameter.Type, asPointer); + if (string.IsNullOrEmpty(parameterType)) + { + parameterType = GetTypeName(parameter.Type, asPointer); + } + parameterType = NormalizeTypeName(writer.Api, parameterType); string parameterName = parameter.Name; @@ -890,21 +945,19 @@ public static class Program } else { - if (part.Equals("DESC", StringComparison.OrdinalIgnoreCase)) + if (s_partRenames.TryGetValue(part, out string? partRemap)) + { + sb.Append(partRemap!); + } + else if (part.StartsWith("DESC", StringComparison.OrdinalIgnoreCase)) { sb.Append("Description"); - } - else if (part.Equals("DESC1", StringComparison.OrdinalIgnoreCase)) - { - sb.Append("Description1"); - } - else if (part.Equals("DESC2", StringComparison.OrdinalIgnoreCase)) - { - sb.Append("Description2"); - } - else if (part.Equals("DESC3", StringComparison.OrdinalIgnoreCase)) - { - sb.Append("Description3"); + string numericPart = part.Replace("DESC", string.Empty); + if (string.IsNullOrEmpty(numericPart) == false && + int.TryParse(numericPart, out int numericValue)) + { + sb.Append(numericValue); + } } else { diff --git a/src/Vortice.Win32/Generated/Direct3D.xml b/src/Vortice.Win32/Generated/Direct3D.xml new file mode 100644 index 0000000..181a36a --- /dev/null +++ b/src/Vortice.Win32/Generated/Direct3D.xml @@ -0,0 +1,4097 @@ + + + + + The ID3DDeviceContextState interface represents a context state object, which holds state and behavior information about a Microsoft Direct3D device. + Microsoft Docs: + + + + + Marks a single point of execution in code. + Microsoft Docs: + A NULL-terminated UNICODE string that contains the name of the marker. The name is not relevant to the operating system. You can choose a name that is meaningful when the calling application is running under the Direct3D profiling tool. +A NULL pointer produces undefined results. + + + + + Retrieves a specific part from a compilation result. + Microsoft Docs: + A pointer to uncompiled shader data; either ASCII HLSL code or a compiled effect. + Length of uncompiled shader data that pSrcData points to. + A D3D_BLOB_PART-typed value that specifies the part of the buffer to retrieve. + Flags that indicate how to retrieve the blob part. Currently, no flags are defined. + The address of a pointer to the ID3DBlob interface that is used to retrieve the specified part of the buffer. + + + + + Marks the beginning of a section of event code. + Microsoft Docs: + A NULL-terminated UNICODE string that contains the name of the event. The name is not relevant to the operating system. You can choose a name that is meaningful when the calling application is running under the Direct3D profiling tool. +A NULL pointer produces undefined results. + + + + + Gets a pointer to a reflection interface. + Microsoft Docs: + A pointer to source data as compiled HLSL code. + Length of pSrcData. + The reference GUID of the COM interface to use. For example, IID_ID3D11ShaderReflection. + A pointer to a reflection interface. + + + + + Note  You can use this API to develop your Windows Store apps, but you can't use it in apps that you submit to the Windows Store. Gets shader debug information. + Microsoft Docs: + A pointer to source data; either uncompiled or compiled HLSL code. + Length of pSrcData. + A pointer to a buffer that receives the ID3DBlob interface that contains debug information. + + + + + Creates a linker interface. Note  This function is part of the HLSL shader linking technology that you can use on all Direct3D 11 platforms to create precompiled HLSL functions, package them into libraries, and link them into full shaders at run time.  . + Microsoft Docs: + A pointer to a variable that receives a pointer to the ID3D11Linker interface that is used to link a shader module. + + + + + Describes shader data. + Microsoft Docs: + + + + A pointer to shader data. + + + Length of shader data that pBytecode points to. + + + + Compresses a set of shaders into a more compact form. + Microsoft Docs: + The number of shaders to compress. + An array of D3D_SHADER_DATA structures that describe the set of shaders to compress. + Flags that indicate how to compress the shaders. Currently, only the D3D_COMPRESS_SHADER_KEEP_ALL_PARTS (0x00000001) flag is defined. + The address of a pointer to the ID3DBlob interface that is used to retrieve the compressed shader data. + + + + + Pixel shader driver caps. + Microsoft Docs: + + + + Instruction predication is supported if this value is nonzero. See setp_comp - vs. + + + Either 0 or 24, which represents the depth of the dynamic flow control instruction nesting. See D3DPSHADERCAPS2_0. + + + The number of temporary registers supported. See D3DPSHADERCAPS2_0. + + + The depth of nesting of the loop - vs/rep - vs and call - vs/callnz bool - vs instructions. See D3DPSHADERCAPS2_0. + + + The number of instruction slots supported. See D3DPSHADERCAPS2_0. + + + + Values that identify parts of the content of an arbitrary length data buffer. + Microsoft Docs: + + + + The blob part is an input signature. + + + The blob part is an output signature. + + + The blob part is an input and output signature. + + + The blob part is a patch constant signature. + + + The blob part is all signature. + + + The blob part is debug information. + + + The blob part is a legacy shader. + + + The blob part is an XNA prepass shader. + + + The blob part is an XNA shader. + + + The blob part is program database (PDB) information. + +
Note  This value is supported by the D3dcompiler_44.dll or later version of the file.
+
 
+
+ + The blob part is private data. + +
Note  This value is supported by the D3dcompiler_44.dll or later version of the file.
+
 
+
+ + The blob part is a root signature. Refer to Specifying Root Signatures in HLSL for more information on using Direct3D12 with HLSL. + +
Note  This value is supported by the D3dcompiler_47.dll or later version of the file.
+
 
+
+ + The blob part is the debug name of the shader. If the application does not specify the debug name itself, an auto-generated name matching the PDB file of the shader is provided instead. + +
Note  This value is supported by the D3dcompiler_47.dll as available on the Windows 10 Fall Creators Update and its SDK, or later version of the file.
+
 
+
+ + The blob part is a test alternate shader. + +
Note  This value identifies a test part and is only produced by special compiler versions. Therefore, this part type is typically not present in shaders.
+
 
+
+ + The blob part is test compilation details. + +
Note  This value identifies a test part and is only produced by special compiler versions. Therefore, this part type is typically not present in shaders.
+
 
+
+ + The blob part is test compilation performance. + +
Note  This value identifies a test part and is only produced by special compiler versions. Therefore, this part type is typically not present in shaders.
+
 
+
+ + The blob part is a test compilation report. + +
Note  This value identifies a test part and is only produced by special compiler versions. Therefore, this part type is typically not present in shaders.
+
 
+
Note  This value is supported by the D3dcompiler_44.dll or later version of the file.
+
 
+
+ + + Compiles Microsoft High Level Shader Language (HLSL) code into bytecode for a given target. + Microsoft Docs: + A pointer to uncompiled shader data (ASCII HLSL code). + The size, in bytes, of the block of memory that pSrcData points to. + An optional pointer to a constant null-terminated string containing the name that identifies the source data to use in error messages. If not used, set to NULL. + An optional array of D3D_SHADER_MACRO structures that define shader macros. Each macro definition contains a name and a NULL-terminated definition. If not used, set to NULL. + A pointer to an ID3DInclude interface that the compiler uses to handle include files. If you set this parameter to NULL and the shader contains a #include, a compile error occurs. You can pass the D3D_COMPILE_STANDARD_FILE_INCLUDE macro, which is a pointer to a default include handler. This default include handler includes files that are relative to the current directory and files that are relative to the directory of the initial source file. When you use D3D_COMPILE_STANDARD_FILE_INCLUDE, you must specify the source file name in the pSourceName parameter; the compiler will derive the initial relative directory from pSourceName. + + +``` + A pointer to a constant null-terminated string that contains the name of the shader entry point function where shader execution begins. When you compile an effect, D3DCompile2 ignores pEntrypoint; we recommend that you set pEntrypoint to NULL because it is good programming practice to set a pointer parameter to NULL if the called function will not use it. + A pointer to a constant null-terminated string that specifies the shader target or set of shader features to compile against. The shader target can be a shader model (for example, shader model 2, shader model 3, shader model 4, or shader model 5). The target can also be an effect type (for example, fx_4_1). For info about the targets that various profiles support, see Specifying Compiler Targets. + A combination of shader D3D compile constants that are combined by using a bitwise OR operation. The resulting value specifies how the compiler compiles the HLSL code. + A combination of effect D3D compile effect constants that are combined by using a bitwise OR operation. The resulting value specifies how the compiler compiles the effect. When you compile a shader and not an effect file, D3DCompile2 ignores Flags2; we recommend that you set Flags2 to zero because it is good programming practice to set a nonpointer parameter to zero if the called function will not use it. + A combination of the following flags that are combined by using a bitwise OR operation. The resulting value specifies how the compiler compiles the HLSL code. + + + + + + + + + + + + + + + + + + +
FlagDescription
D3DCOMPILE_SECDATA_MERGE_UAV_SLOTS (0x01)Merge unordered access view (UAV) slots in the secondary data that the pSecondaryData parameter points to.
D3DCOMPILE_SECDATA_PRESERVE_TEMPLATE_SLOTS (0x02)Preserve template slots in the secondary data that the pSecondaryData parameter points to.
D3DCOMPILE_SECDATA_REQUIRE_TEMPLATE_MATCH (0x04)Require that templates in the secondary data that the pSecondaryData parameter points to match when the compiler compiles the HLSL code.
+  + +If pSecondaryData is NULL, set to zero. + A pointer to secondary data. If you don't pass secondary data, set to NULL. Use this secondary data to align UAV slots in two shaders. Suppose shader A has UAVs and they are bound to some slots. To compile shader B such that UAVs with the same names are mapped in B to the same slots as in A, pass A’s byte code to D3DCompile2 as the secondary data. + The size, in bytes, of the block of memory that pSecondaryData points to. If pSecondaryData is NULL, set to zero. + A pointer to a variable that receives a pointer to the ID3DBlob interface that you can use to access the compiled code. + A pointer to a variable that receives a pointer to the ID3DBlob interface that you can use to access compiler error messages, or NULL if there are no errors. +
+
+ + + Specifies hardware overlay capabilities for a Direct3D device. + Microsoft Docs: + + + + Contains a bitwise OR of the following flags. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueMeaning
+
D3DOVERLAYCAPS_FULLRANGERGB
+
0x00000001
+
+
+The overlay supports RGB with a nominal range of 0–255 per channel. + +
+
D3DOVERLAYCAPS_LIMITEDRANGERGB
+
0x00000002
+
+
+The overlay supports RGB with a nominal range of 16–235 per channel. Reference black is (16,16,16) and reference white is (235,235,235). + +
+
D3DOVERLAYCAPS_YCbCr_BT601
+
0x00000004
+
+
+The overlay supports the BT.601 definition of YUV. + +
+
D3DOVERLAYCAPS_YCbCr_BT709
+
0x00000008
+
+
+The overlay supports the BT.709 definition of YUV. + +
+
D3DOVERLAYCAPS_YCbCr_BT601_xvYCC
+
0x00000010
+
+
+The overlay supports extended YCbCr (xvYCC) for BT.601 YUV. + +
+
D3DOVERLAYCAPS_YCbCr_BT709_xvYCC
+
0x00000020
+
+
+The overlay supports extended YCbCr (xvYCC) for BT.709 YUV. + +
+
D3DOVERLAYCAPS_STRETCHX
+
0x00000040
+
+
+The device can stretch and shrink the overlay data arbitrarily in the horizontal direction. + +
+
D3DOVERLAYCAPS_STRETCHY
+
0x00000080
+
+
+The device can stretch and shrink the overlay data arbitrarily in the vertical direction. + +
+
+ + The maximum overlay width after stretching. + + + The maximum overlay height after stretching. + + + + Values that identify the intended use of constant-buffer data. + Microsoft Docs: + + + + A buffer containing scalar constants. + + + A buffer containing texture data. + + + A buffer containing interface pointers. + + + A buffer containing binding information. + + + A buffer containing scalar constants. + + + A buffer containing texture data. + + + A buffer containing scalar constants. + + + A buffer containing texture data. + + + A buffer containing interface pointers. + + + A buffer containing binding information. + + + + Disassembles a specific region of compiled Microsoft High Level Shader Language (HLSL) code. + Microsoft Docs: + A pointer to compiled shader data. + The size, in bytes, of the block of memory that pSrcData points to. + A combination of zero or more of the following flags that are combined by using a bitwise OR operation. The resulting value specifies how D3DDisassembleRegion disassembles the compiled shader data. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FlagDescription
D3D_DISASM_ENABLE_COLOR_CODE (0x01)Enable the output of color codes.
D3D_DISASM_ENABLE_DEFAULT_VALUE_PRINTS (0x02)Enable the output of default values.
D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING (0x04)Enable instruction numbering.
D3D_DISASM_ENABLE_INSTRUCTION_CYCLE (0x08)No effect.
D3D_DISASM_DISABLE_DEBUG_INFO (0x10)Disable the output of debug information.
D3D_DISASM_ENABLE_INSTRUCTION_OFFSET (0x20)Enable the output of instruction offsets.
D3D_DISASM_INSTRUCTION_ONLY (0x40)This flag has no effect in D3DDisassembleRegion. Cycle information comes from the trace; therefore, cycle information is available only in D3DDisassemble11Trace's trace disassembly.
+ A pointer to a constant null-terminated string at the top of the shader that identifies the shader constants and variables. + The number of bytes offset into the compiled shader data where D3DDisassembleRegion starts the disassembly. + The number of instructions to disassemble. + A pointer to a variable that receives the number of bytes offset into the compiled shader data where D3DDisassembleRegion finishes the disassembly. + A pointer to a buffer that receives the ID3DBlob interface that accesses the disassembled HLSL code. +
+
+ + + ID3DInclude is an include interface that the user implements to allow an application to call user-overridable methods for opening and closing shader + Microsoft Docs: + + + + + Note  D3DGetInputAndOutputSignatureBlob may be altered or unavailable for releases after Windows 8.1. Instead use D3DGetBlobPart with the D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB value.  Gets the input and output signatures from a compilation result. + Microsoft Docs: + A pointer to source data as compiled HLSL code. + Length of pSrcData. + A pointer to a buffer that receives the ID3DBlob interface that contains a compiled shader. + + + + + Strip flag options. + Microsoft Docs: + + + + Remove reflection data. + + + Remove debug information. + + + Remove test blob data. + + +
Note  This value is supported by the D3dcompiler_44.dll or later version of the file.
+
 
+Remove private data.
+
+ +
Note  This value is supported by the D3dcompiler_47.dll or later version of the file.
+
 
+Remove the root signature. Refer to Specifying Root Signatures in HLSL for more information on using Direct3D12 with HLSL.
+
+ + Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used. + + + + The ID3DUserDefinedAnnotation interface enables an application to describe conceptual sections and markers within the application's code flow. + Microsoft Docs: + + + + + Creates a buffer. + Microsoft Docs: + Number of bytes in the blob. + The address of a pointer to the ID3DBlob interface that is used to retrieve the buffer. + + + + + Creates a library-reflection interface from source data that contains an HLSL library of functions. + Microsoft Docs: + A pointer to source data as an HLSL library of functions. + The size, in bytes, of the block of memory that pSrcData points to. + The reference GUID of the COM interface to use. For example, IID_ID3D11LibraryReflection. + A pointer to a variable that receives a pointer to a library-reflection interface, ID3D11LibraryReflection. + + + + + Specifies a shader model. + Microsoft Docs: + + + + Indicates shader model 5.1. + + + Indicates shader model 6.0. + + + Indicates shader model 6.1. + + + + Describes the content protection capabilities of a display driver. + Microsoft Docs: + + + + Bitwise OR of zero or more flags. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueMeaning
+
D3DCPCAPS_SOFTWARE
+
0x00000001
+
+
+The encryption is implemented in software by the driver. + +
+
D3DCPCAPS_HARDWARE
+
0x00000002
+
+
+The encryption is implemented in hardware by the GPU. + +
+
D3DCPCAPS_PROTECTIONALWAYSON
+
0x00000004
+
+
+Content protection is always applied to a protected Direct3D surface, regardless of whether the application explicitly enables content protection. + +
+
D3DCPCAPS_PARTIALDECRYPTION
+
0x00000008
+
+
+The driver can use partially encrypted buffers. If this capability is not present, the entire buffer must be either encrypted or clear. + +
+
D3DCPCAPS_CONTENTKEY
+
0x00000010
+
+
+The driver can encrypt data using a separate content key that is encrypted using the session key. For more information, see IDirect3DCryptoSession9::DecryptionBlt. + +
+
D3DCPCAPS_FRESHENSESSIONKEY
+
0x00000020
+
+
+The driver can refresh the session key without renegotiating the key. To refresh the session key, call IDirect3DCryptoSession9::StartSessionKeyRefresh. + +
+
D3DCPCAPS_ENCRYPTEDREADBACK
+
0x00000040
+
+
+The driver can read back encrypted data from a protected surface, using the IDirect3DCryptoSession9::EncryptionBlt method. + +
+
D3DCPCAPS_ENCRYPTEDREADBACKKEY
+
0x00000080
+
+
+The driver requires a separate key to read encrypted data from a protected surface. To get this second key, call IDirect3DCryptoSession9::GetEncryptionBltKey. + +
+
D3DCPCAPS_SEQUENTIAL_CTR_IV
+
0x00000100
+
+
+If the encryption type is D3DCRYPTOTYPE_AES128_CTR, the application must use a sequential count in the DXVA2_AES_CTR_IV structure. For more information, see the remarks for DXVA2_AES_CTR_IV. + +
+
+ + Specifies the type of key exchange required to negotiate the session key. The following GUIDs are defined. + + + + + + + + + + + + + + +
ValueMeaning
+
D3DKEYEXCHANGE_RSAES_OAEP
+
+
+The decoder encrypts the session key using RSA Encryption Scheme - Optimal Asymmetric Encryption Padding (RSAES-OAEP). + +
+
D3DKEYEXCHANGE_DXVA
+
+
+Use the key exchange mechanism defined for DirectX Video Acceleration 2 (DXVA-2). + +
+
+ + The memory alignment required for buffers used by the GPU cryptographic engine. If the application uses a system memory buffer to pass encrypted content to the GPU, or to read back encrypted content from the GPU, the buffer's starting address must be a multiple of this value. + + + The block alignment required by the GPU cryptographic engine. The size of data to be encrypted must be a multiple of this value. + + + The total amount of memory that can be used to hold protected surfaces. + + + + Values that identify the data types that can be stored in a register. + Microsoft Docs: + + + + The data type is unknown. + + + 32-bit unsigned integer. + + + 32-bit signed integer. + + + 32-bit floating-point number. + + + The data type is unknown. + + + 32-bit unsigned integer. + + + 32-bit signed integer. + + + 32-bit floating-point number. + + + + Note  D3DGetInputSignatureBlob may be altered or unavailable for releases after Windows 8.1. Instead use D3DGetBlobPart with the D3D_BLOB_INPUT_SIGNATURE_BLOB value.  Gets the input signature from a compilation result. + Microsoft Docs: + A pointer to source data as compiled HLSL code. + Length of pSrcData. + A pointer to a buffer that receives the ID3DBlob interface that contains a compiled shader. + + + + + Values that identify the indended use of a constant-data buffer. + Microsoft Docs: + + + + Bind the constant buffer to an input slot defined in HLSL code (instead of letting the compiler choose the input slot). + + + Bind the constant buffer to an input slot defined in HLSL code (instead of letting the compiler choose the input slot). + + + This value is not used by a programmer; it exists to force the enumeration to compile to 32 bits. + + + + A user-implemented method for opening and reading the contents of a shader + Microsoft Docs: + A D3D_INCLUDE_TYPE-typed value that indicates the location of the #include file. + Name of the #include file. + Pointer to the container that includes the #include file. The compiler might pass NULL in pParentData. For more information, see the "Searching for Include Files" section in Compile an Effect (Direct3D 11). + Pointer to the buffer that contains the include directives. This pointer remains valid until you callID3DInclude::Close. + Pointer to the number of bytes that Open returns in ppData. + + + + + Note  D3DGetOutputSignatureBlob may be altered or unavailable for releases after Windows 8.1. Instead use D3DGetBlobPart with the D3D_BLOB_OUTPUT_SIGNATURE_BLOB value.  Gets the output signature from a compilation result. + Microsoft Docs: + A pointer to source data as compiled HLSL code. + Length of pSrcData. + A pointer to a buffer that receives the ID3DBlob interface that contains a compiled shader. + + + + + Values that identify the type of resource to be viewed as a shader resource. + Microsoft Docs: + + + + The type is unknown. + + + The resource is a buffer. + + + The resource is a 1D texture. + + + The resource is an array of 1D textures. + + + The resource is a 2D texture. + + + The resource is an array of 2D textures. + + + The resource is a multisampling 2D texture. + + + The resource is an array of multisampling 2D textures. + + + The resource is a 3D texture. + + + The resource is a cube texture. + + + The resource is an array of cube textures. + + + The resource is a raw buffer. For more info about raw viewing of buffers, see Raw Views of Buffers. + + + The type is unknown. + + + The resource is a buffer. + + + The resource is a 1D texture. + + + The resource is an array of 1D textures. + + + The resource is a 2D texture. + + + The resource is an array of 2D textures. + + + The resource is a multisampling 2D texture. + + + The resource is an array of multisampling 2D textures. + + + The resource is a 3D texture. + + + The resource is a cube texture. + + + The type is unknown. + + + The resource is a buffer. + + + The resource is a 1D texture. + + + The resource is an array of 1D textures. + + + The resource is a 2D texture. + + + The resource is an array of 2D textures. + + + The resource is a multisampling 2D texture. + + + The resource is an array of multisampling 2D textures. + + + The resource is a 3D texture. + + + The resource is a cube texture. + + + The resource is an array of cube textures. + + + The type is unknown. + + + The resource is a buffer. + + + The resource is a 1D texture. + + + The resource is an array of 1D textures. + + + The resource is a 2D texture. + + + The resource is an array of 2D textures. + + + The resource is a multisampling 2D texture. + + + The resource is an array of multisampling 2D textures. + + + The resource is a 3D texture. + + + The resource is a cube texture. + + + The resource is an array of cube textures. + + + The resource is a raw buffer. For more info about raw viewing of buffers, see Raw Views of Buffers. + + + + Disassembles a section of compiled Microsoft High Level Shader Language (HLSL) code that is specified by shader trace steps. + Microsoft Docs: + A pointer to compiled shader data. + The size, in bytes, of the block of memory that pSrcData points to. + A pointer to the ID3D11ShaderTrace interface for the shader trace information object. + The number of the step in the trace from which D3DDisassemble11Trace starts the disassembly. + The number of trace steps to disassemble. + A combination of zero or more of the following flags that are combined by using a bitwise OR operation. The resulting value specifies how D3DDisassemble11Trace disassembles the compiled shader data. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FlagDescription
D3D_DISASM_ENABLE_COLOR_CODE (0x01) Enable the output of color codes.
D3D_DISASM_ENABLE_DEFAULT_VALUE_PRINTS (0x02) Enable the output of default values.
D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING (0x04) Enable instruction numbering.
D3D_DISASM_ENABLE_INSTRUCTION_CYCLE (0x08) No effect.
D3D_DISASM_DISABLE_DEBUG_INFO (0x10) Disable the output of debug information.
D3D_DISASM_ENABLE_INSTRUCTION_OFFSET (0x20) Enable the output of instruction offsets.
D3D_DISASM_INSTRUCTION_ONLY (0x40) +Enable the output of the instruction cycle per step in D3DDisassemble11Trace. This flag is similar to the D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING and D3D_DISASM_ENABLE_INSTRUCTION_OFFSET flags. + +This flag has no effect in the D3DDisassembleRegion function. Cycle information comes from the trace; therefore, cycle information is available only in the trace disassembly. +
+ A pointer to a buffer that receives the ID3DBlob interface that accesses the disassembled HLSL code. +
+
+ + + Values that indicate how the pipeline interprets vertex data that is bound to the input-assembler stage. These primitive topology values determine how the vertex data is rendered on screen. + Microsoft Docs: + + + + The IA stage has not been initialized with a primitive topology. The IA stage will not function properly unless a primitive topology is defined. + + + Interpret the vertex data as a list of points. + + + Interpret the vertex data as a list of lines. + + + Interpret the vertex data as a line strip. + + + Interpret the vertex data as a list of triangles. + + + Interpret the vertex data as a triangle strip. + + + Interpret the vertex data as a list of lines with adjacency data. + + + Interpret the vertex data as a line strip with adjacency data. + + + Interpret the vertex data as a list of triangles with adjacency data. + + + Interpret the vertex data as a triangle strip with adjacency data. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + The IA stage has not been initialized with a primitive topology. The IA stage will not function properly unless a primitive topology is defined. + + + Interpret the vertex data as a list of points. + + + Interpret the vertex data as a list of lines. + + + Interpret the vertex data as a line strip. + + + Interpret the vertex data as a list of triangles. + + + Interpret the vertex data as a triangle strip. + + + Interpret the vertex data as a list of lines with adjacency data. + + + Interpret the vertex data as a line strip with adjacency data. + + + Interpret the vertex data as a list of triangles with adjacency data. + + + Interpret the vertex data as a triangle strip with adjacency data. + + + The IA stage has not been initialized with a primitive topology. The IA stage will not function properly unless a primitive topology is defined. + + + Interpret the vertex data as a list of points. + + + Interpret the vertex data as a list of lines. + + + Interpret the vertex data as a line strip. + + + Interpret the vertex data as a list of triangles. + + + Interpret the vertex data as a triangle strip. + + + Interpret the vertex data as a list of lines with adjacency data. + + + Interpret the vertex data as a line strip with adjacency data. + + + Interpret the vertex data as a list of triangles with adjacency data. + + + Interpret the vertex data as a triangle strip with adjacency data. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + Interpret the vertex data as a patch list. + + + + Values that identify various data, texture, and buffer types that can be assigned to a shader variable. + Microsoft Docs: + + + + The variable is a void pointer. + + + The variable is a boolean. + + + The variable is an integer. + + + The variable is a floating-point number. + + + The variable is a string. + + + The variable is a texture. + + + The variable is a 1D texture. + + + The variable is a 2D texture. + + + The variable is a 3D texture. + + + The variable is a texture cube. + + + The variable is a sampler. + + + The variable is a 1D sampler. + + + The variable is a 2D sampler. + + + The variable is a 3D sampler. + + + The variable is a cube sampler. + + + The variable is a pixel shader. + + + The variable is a vertex shader. + + + The variable is a pixel fragment. + + + The variable is a vertex fragment. + + + The variable is an unsigned integer. + + + The variable is an 8-bit unsigned integer. + + + The variable is a geometry shader. + + + The variable is a rasterizer-state object. + + + The variable is a depth-stencil-state object. + + + The variable is a blend-state object. + + + The variable is a buffer. + + + The variable is a constant buffer. + + + The variable is a texture buffer. + + + The variable is a 1D-texture array. + + + The variable is a 2D-texture array. + + + The variable is a render-target view. + + + The variable is a depth-stencil view. + + + The variable is a 2D-multisampled texture. + + + The variable is a 2D-multisampled-texture array. + + + The variable is a texture-cube array. + + + The variable holds a compiled hull-shader binary. + + + The variable holds a compiled domain-shader binary. + + + The variable is an interface. + + + The variable holds a compiled compute-shader binary. + + + The variable is a double precision (64-bit) floating-point number. + + + The variable is a 1D read-and-write texture. + + + The variable is an array of 1D read-and-write textures. + + + The variable is a 2D read-and-write texture. + + + The variable is an array of 2D read-and-write textures. + + + The variable is a 3D read-and-write texture. + + + The variable is a read-and-write buffer. + + + The variable is a byte-address buffer. + + + The variable is a read-and-write byte-address buffer. + + + The variable is a structured buffer. + +For more information about structured buffer, see the Remarks section. + + + The variable is a read-and-write structured buffer. + + + The variable is an append structured buffer. + + + The variable is a consume structured buffer. + + + The variable is an 8-byte FLOAT. + + + The variable is a 10-byte FLOAT. + + + The variable is a 16-byte FLOAT. + + + The variable is a 12-byte INT. + + + The variable is a 16-byte INT. + + + The variable is a 16-byte INT. + + + The variable is a void pointer. + + + The variable is a boolean. + + + The variable is an integer. + + + The variable is a floating-point number. + + + The variable is a string. + + + The variable is a texture. + + + The variable is a 1D texture. + + + The variable is a 2D texture. + + + The variable is a 3D texture. + + + The variable is a texture cube. + + + The variable is a sampler. + + + The variable is a 1D sampler. + + + The variable is a 2D sampler. + + + The variable is a 3D sampler. + + + The variable is a cube sampler. + + + The variable is a pixel shader. + + + The variable is a vertex shader. + + + The variable is a pixel fragment. + + + The variable is a vertex fragment. + + + The variable is an unsigned integer. + + + The variable is an 8-bit unsigned integer. + + + The variable is a geometry shader. + + + The variable is a rasterizer-state object. + + + The variable is a depth-stencil-state object. + + + The variable is a blend-state object. + + + The variable is a buffer. + + + The variable is a constant buffer. + + + The variable is a texture buffer. + + + The variable is a 1D-texture array. + + + The variable is a 2D-texture array. + + + The variable is a render-target view. + + + The variable is a depth-stencil view. + + + The variable is a 2D-multisampled texture. + + + The variable is a 2D-multisampled-texture array. + + + The variable is a texture-cube array. + + + The variable holds a compiled hull-shader binary. + + + The variable holds a compiled domain-shader binary. + + + The variable is an interface. + + + The variable holds a compiled compute-shader binary. + + + The variable is a double precision (64-bit) floating-point number. + + + The variable is a 1D read-and-write texture. + + + The variable is an array of 1D read-and-write textures. + + + The variable is a 2D read-and-write texture. + + + The variable is an array of 2D read-and-write textures. + + + The variable is a 3D read-and-write texture. + + + The variable is a read-and-write buffer. + + + The variable is a byte-address buffer. + + + The variable is a read and write byte-address buffer. + + + The variable is a structured buffer. + + + The variable is a read-and-write structured buffer. + + + The variable is an append structured buffer. + + + The variable is a consume structured buffer. + + + This value is not used by a programmer; it exists to force the enumeration to compile to 32 bits. + + + + A user-implemented method for closing a shader + Microsoft Docs: + Pointer to the buffer that contains the include directives. This is the pointer that was returned by the corresponding ID3DInclude::Open call. + + + + + Specifies the version of root signature layout. + Microsoft Docs: + + + + Version one of root signature layout. + + + Version one of root signature layout. + + + Version 1.1 of root signature layout. Refer to Root Signature Version 1.1. + + + + Values that indicate the location of a shader + Microsoft Docs: + + + + The local directory. + + + The system directory. + + + The local directory. + + + The system directory. + + + Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. + +Do not use this value. + + + + Indicates semantic flags for function parameters. + Microsoft Docs: + + + + The parameter has no semantic flags. + + + Indicates an input parameter. + + + Indicates an output parameter. + + + Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used. + + + + Determines whether the calling application is running under a Microsoft Direct3D profiling tool. + Microsoft Docs: + + + + + Removes unwanted blobs from a compilation result. + Microsoft Docs: + A pointer to source data as compiled HLSL code. + Length of pSrcData. + Strip flag options, represented by D3DCOMPILER_STRIP_FLAGS. + A pointer to a variable that receives a pointer to the ID3DBlob interface that you can use to access the unwanted stripped out shader code. + + + + + Creates a function-linking-graph interface. + Microsoft Docs: + Reserved + A pointer to a variable that receives a pointer to the ID3D11FunctionLinkingGraph interface that is used for constructing shaders that consist of a sequence of precompiled function calls. + + + + + Reads a file that is on disk into memory. + Microsoft Docs: + A pointer to a constant null-terminated string that contains the name of the file to read into memory. + A pointer to a variable that receives a pointer to the ID3DBlob interface that contains information that D3DReadFileToBlob read from the pFileName file. You can use this ID3DBlob interface to access the file information and pass it to other compiler functions. + + + + + Compiles Microsoft High Level Shader Language (HLSL) code into bytecode for a given target. + Microsoft Docs: + A pointer to a constant null-terminated string that contains the name of the file that contains the shader code. + An optional array of D3D_SHADER_MACRO structures that define shader macros. Each macro definition contains a name and a NULL-terminated definition. If not used, set to NULL. + An optional pointer to an ID3DInclude interface that the compiler uses to handle include files. If you set this parameter to NULL and the shader contains a #include, a compile error occurs. You can pass the D3D_COMPILE_STANDARD_FILE_INCLUDE macro, which is a pointer to a default include handler. This default include handler includes files that are relative to the current directory. + + +``` + A pointer to a constant null-terminated string that contains the name of the shader entry point function where shader execution begins. When you compile an effect, D3DCompileFromFile ignores pEntrypoint; we recommend that you set pEntrypoint to NULL because it is good programming practice to set a pointer parameter to NULL if the called function will not use it. + A pointer to a constant null-terminated string that specifies the shader target or set of shader features to compile against. The shader target can be a shader model (for example, shader model 2, shader model 3, shader model 4, or shader model 5 and later). The target can also be an effect type (for example, fx_4_1). For info about the targets that various profiles support, see Specifying Compiler Targets. + A combination of shader compile options that are combined by using a bitwise OR operation. The resulting value specifies how the compiler compiles the HLSL code. + A combination of effect compile options that are combined by using a bitwise OR operation. The resulting value specifies how the compiler compiles the effect. When you compile a shader and not an effect file, D3DCompileFromFile ignores Flags2; we recommend that you set Flags2 to zero because it is good programming practice to set a nonpointer parameter to zero if the called function will not use it. + A pointer to a variable that receives a pointer to the ID3DBlob interface that you can use to access the compiled code. + An optional pointer to a variable that receives a pointer to the ID3DBlob interface that you can use to access compiler error messages, or NULL if there are no errors. + + + + + Marks the end of a section of event code. + Microsoft Docs: + + + + + Values that identify shader parameters that use system-value semantics. + Microsoft Docs: + + + + This parameter does not use a predefined system-value semantic. + + + This parameter contains position data. + + + This parameter contains clip-distance data. + + + This parameter contains cull-distance data. + + + This parameter contains a render-target-array index. + + + This parameter contains a viewport-array index. + + + This parameter contains a vertex ID. + + + This parameter contains a primitive ID. + + + This parameter contains an instance ID. + + + This parameter contains data that identifies whether or not the primitive faces the camera. + + + This parameter contains a sampler-array index. + + + This parameter contains one of four tessellation factors that correspond to the amount of parts that a quad patch is broken into along the given edge. This flag is used to tessellate a quad patch. + + + This parameter contains one of two tessellation factors that correspond to the amount of parts that a quad patch is broken into vertically and horizontally within the patch. This flag is used to tessellate a quad patch. + + + This parameter contains one of three tessellation factors that correspond to the amount of parts that a tri patch is broken into along the given edge. This flag is used to tessellate a tri patch. + + + This parameter contains the tessellation factor that corresponds to the amount of parts that a tri patch is broken into within the patch. This flag is used to tessellate a tri patch. + + + This parameter contains the tessellation factor that corresponds to the number of lines broken into within the patch. This flag is used to tessellate an isolines patch. + + + This parameter contains the tessellation factor that corresponds to the number of lines that are created within the patch. This flag is used to tessellate an isolines patch. + + + This parameter contains barycentric coordinate data. + + + This parameter contains render-target data. + + + This parameter contains depth data. + + + This parameter contains alpha-coverage data. + + + This parameter signifies that the value is greater than or equal to a reference value. This flag is used to specify conservative depth for a pixel shader. + + + This parameter signifies that the value is less than or equal to a reference value. This flag is used to specify conservative depth for a pixel shader. + + + This parameter contains a stencil reference. + See Shader Specified Stencil Reference Value. + + + This parameter contains inner input coverage data. + See Conservative Rasterization. + + + This parameter does not use a predefined system-value semantic. + + + This parameter contains position data. + + + This parameter contains clip-distance data. + + + This parameter contains cull-distance data. + + + This parameter contains a render-target-array index. + + + This parameter contains a viewport-array index. + + + This parameter contains a vertex ID. + + + This parameter contains a primitive ID. + + + This parameter contains a instance ID. + + + This parameter contains data that identifies whether or not the primitive faces the camera. + + + This parameter contains a sampler-array index. + + + This parameter contains render-target data. + + + This parameter contains depth data. + + + This parameter contains alpha-coverage data. + + + This parameter contains one of four tessellation factors that correspond to the amount of parts that a quad patch is broken into along the given edge. This flag is used to tessellate a quad patch. + + + This parameter contains one of two tessellation factors that correspond to the amount of parts that a quad patch is broken into vertically and horizontally within the patch. This flag is used to tessellate a quad patch. + + + This parameter contains one of three tessellation factors that correspond to the amount of parts that a tri patch is broken into along the given edge. This flag is used to tessellate a tri patch. + + + This parameter contains the tessellation factor that corresponds to the amount of parts that a tri patch is broken into within the patch. This flag is used to tessellate a tri patch. + + + This parameter contains the tessellation factor that corresponds to the amount of lines broken into within the patch. This flag is used to tessellate an isolines patch. + + + This parameter contains the tessellation factor that corresponds to the amount of lines that are created within the patch. This flag is used to tessellate an isolines patch. + + + This parameter signifies that the value is greater than or equal to a reference value. This flag is used to specify conservative depth for a pixel shader. + + + This parameter signifies that the value is less than or equal to a reference value. This flag is used to specify conservative depth for a pixel shader. + + + This parameter contains a stencil reference. + See Shader Specified Stencil Reference Value. + + + This parameter contains inner input coverage data. + See Conservative Rasterization. + + + This parameter contains barycentric coordinate data. + + + + Preprocesses uncompiled HLSL code. + Microsoft Docs: + A pointer to uncompiled shader data; either ASCII HLSL code or a compiled effect. + Length of pSrcData. + The name of the file that contains the uncompiled HLSL code. + An array of NULL-terminated macro definitions (see D3D_SHADER_MACRO). + A pointer to an ID3DInclude for handling include files. Setting this to NULL will cause a compile error if a shader contains a #include. You can pass the D3D_COMPILE_STANDARD_FILE_INCLUDE macro, which is a pointer to a default include handler. This default include handler includes files that are relative to the current directory and files that are relative to the directory of the initial source file. When you use D3D_COMPILE_STANDARD_FILE_INCLUDE, you must specify the source file name in the pSourceName parameter; the compiler will derive the initial relative directory from pSourceName. + + +```cpp + The address of a ID3DBlob that contains the compiled code. + A pointer to an ID3DBlob that contains compiler error messages, or NULL if there were no errors. + + + + + Compile HLSL code or an effect file into bytecode for a given target. + Microsoft Docs: + A pointer to uncompiled shader data; either ASCII HLSL code or a compiled effect. + Length of pSrcData. + You can use this parameter for strings that specify error messages. If not used, set to NULL. + An array of NULL-terminated macro definitions (see D3D_SHADER_MACRO). + Optional. A pointer to an ID3DInclude for handling include files. Setting this to NULL will cause a compile error if a shader contains a #include. You can pass the D3D_COMPILE_STANDARD_FILE_INCLUDE macro, which is a pointer to a default include handler. This default include handler includes files that are relative to the current directory and files that are relative to the directory of the initial source file. When you use D3D_COMPILE_STANDARD_FILE_INCLUDE, you must specify the source file name in the pSourceName parameter; the compiler will derive the initial relative directory from pSourceName. + + +```cpp + The name of the shader entry point function where shader execution begins. When you compile using a fx profile (for example, fx_4_0, fx_5_0, and so on), D3DCompile ignores pEntrypoint. In this case, we recommend that you set pEntrypoint to NULL because it is good programming practice to set a pointer parameter to NULL if the called function will not use it. For all other shader profiles, a valid pEntrypoint is required. + A string that specifies the shader target or set of shader features to compile against. The shader target can be shader model 2, shader model 3, shader model 4, or shader model 5. The target can also be an effect type (for example, fx_4_1). For info about the targets that various profiles support, see Specifying Compiler Targets. + Flags defined by D3D compile constants. + Flags defined by D3D compile effect constants. When you compile a shader and not an effect file, D3DCompile ignores Flags2; we recommend that you set Flags2 to zero because it is good programming practice to set a nonpointer parameter to zero if the called function will not use it. + A pointer to a variable that receives a pointer to the ID3DBlob interface that you can use to access the compiled code. + A pointer to a variable that receives a pointer to the ID3DBlob interface that you can use to access compiler error messages, or NULL if there are no errors. + + + + + Values that identify information about a shader variable. + Microsoft Docs: + + + + Indicates that the registers assigned to this shader variable were explicitly declared in shader code (instead of automatically assigned by the compiler). + + + Indicates that this variable is used by this shader. This value confirms that a particular shader variable (which can be common to many different shaders) is indeed used by a particular shader. + + + Indicates that this variable is an interface. + + + Indicates that this variable is a parameter of an interface. + + + Indicates that the registers assigned to this shader variable were explicitly declared in shader code (instead of automatically assigned by the compiler). + + + Indicates that this variable is used by this shader. This value confirms that a particular shader variable (which can be common to many different shaders) is indeed used by a particular shader. + + + Indicates that this variable is an interface. + + + Indicates that this variable is a parameter of an interface. + + + This value is not used by a programmer; it exists to force the enumeration to compile to 32 bits. + + + + Represents the capabilities of the hardware exposed through the Direct3D object. + Microsoft Docs: + + + + Member of the D3DDEVTYPE enumerated type, which identifies what type of resources are used for processing vertices. + + + Adapter on which this Direct3D device was created. This ordinal is valid only to pass to methods of the IDirect3D9 interface that created this Direct3D device. The IDirect3D9 interface can always be retrieved by calling GetDirect3D. + + + The following driver-specific capability. + + + + + + + + + + + + + + +
ValueMeaning
+
D3DCAPS_READ_SCANLINE
+
+
+Display hardware is capable of returning the current scan line. + +
+
D3DCAPS_OVERLAY
+
+
+The display driver supports an overlay DDI that allows for verification of overlay capabilities. For more information about the overlay DDI, see Overlay DDI. + + + + + + +
+Differences between Direct3D 9 and Direct3D 9Ex: + +This flag is available in Direct3D 9Ex only. + +
+  + + + +
+
+ + Driver-specific capabilities identified in D3DCAPS2. + + + Driver-specific capabilities identified in D3DCAPS3. + + + +Bit mask of values representing what presentation swap intervals are available. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueMeaning
+
D3DPRESENT_INTERVAL_IMMEDIATE
+
+
+The driver supports an immediate presentation swap interval. + +
+
D3DPRESENT_INTERVAL_ONE
+
+
+The driver supports a presentation swap interval of every screen refresh. + +
+
D3DPRESENT_INTERVAL_TWO
+
+
+The driver supports a presentation swap interval of every second screen refresh. + +
+
D3DPRESENT_INTERVAL_THREE
+
+
+The driver supports a presentation swap interval of every third screen refresh. + +
+
D3DPRESENT_INTERVAL_FOUR
+
+
+The driver supports a presentation swap interval of every fourth screen refresh. + +
+
+ + +Bit mask indicating what hardware support is available for cursors. Direct3D 9 does not define alpha-blending cursor capabilities. + + + + + + + + + + + + + + + + +
ValueMeaning
+
D3DCURSORCAPS_COLOR
+
+
+A full-color cursor is supported in hardware. Specifically, this flag indicates that the driver supports at least a hardware color cursor in high-resolution modes (with scan lines greater than or equal to 400). + +
+
D3DCURSORCAPS_LOWRES
+
+
+A full-color cursor is supported in hardware. Specifically, this flag indicates that the driver supports a hardware color cursor in both high-resolution and low-resolution modes (with scan lines less than 400). + +
+
+ + +Flags identifying the capabilities of the device. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueMeaning
+
D3DDEVCAPS_CANBLTSYSTONONLOCAL
+
+
+Device supports blits from system-memory textures to nonlocal video-memory textures. + +
+
D3DDEVCAPS_CANRENDERAFTERFLIP
+
+
+Device can queue rendering commands after a page flip. Applications do not change their behavior if this flag is set; this capability means that the device is relatively fast. + +
+
D3DDEVCAPS_DRAWPRIMITIVES2
+
+
+Device can support at least a DirectX 5-compliant driver. + +
+
D3DDEVCAPS_DRAWPRIMITIVES2EX
+
+
+Device can support at least a DirectX 7-compliant driver. + +
+
D3DDEVCAPS_DRAWPRIMTLVERTEX
+
+
+Device exports an IDirect3DDevice9::DrawPrimitive-aware hal. + +
+
D3DDEVCAPS_EXECUTESYSTEMMEMORY
+
+
+Device can use execute buffers from system memory. + +
+
D3DDEVCAPS_EXECUTEVIDEOMEMORY
+
+
+Device can use execute buffers from video memory. + +
+
D3DDEVCAPS_HWRASTERIZATION
+
+
+Device has hardware acceleration for scene rasterization. + +
+
D3DDEVCAPS_HWTRANSFORMANDLIGHT
+
+
+Device can support transformation and lighting in hardware. + +
+
D3DDEVCAPS_NPATCHES
+
+
+Device supports N patches. + +
+
D3DDEVCAPS_PUREDEVICE
+
+
+Device can support rasterization, transform, lighting, and shading in hardware. + +
+
D3DDEVCAPS_QUINTICRTPATCHES
+
+
+Device supports quintic Bézier curves and B-splines. + +
+
D3DDEVCAPS_RTPATCHES
+
+
+Device supports rectangular and triangular patches. + +
+
D3DDEVCAPS_RTPATCHHANDLEZERO
+
+
+When this device capability is set, the hardware architecture does not require caching of any information, and uncached patches (handle zero) will be drawn as efficiently as cached ones. Note that setting D3DDEVCAPS_RTPATCHHANDLEZERO does not mean that a patch with handle zero can be drawn. A handle-zero patch can always be drawn whether this cap is set or not. + +
+
D3DDEVCAPS_SEPARATETEXTUREMEMORIES
+
+
+Device is texturing from separate memory pools. + +
+
D3DDEVCAPS_TEXTURENONLOCALVIDMEM
+
+
+Device can retrieve textures from non-local video memory. + +
+
D3DDEVCAPS_TEXTURESYSTEMMEMORY
+
+
+Device can retrieve textures from system memory. + +
+
D3DDEVCAPS_TEXTUREVIDEOMEMORY
+
+
+Device can retrieve textures from device memory. + +
+
D3DDEVCAPS_TLVERTEXSYSTEMMEMORY
+
+
+Device can use buffers from system memory for transformed and lit vertices. + +
+
D3DDEVCAPS_TLVERTEXVIDEOMEMORY
+
+
+Device can use buffers from video memory for transformed and lit vertices. + +
+
+ + Miscellaneous driver primitive capabilities. See D3DPMISCCAPS. + + + +Information on raster-drawing capabilities. This member can be one or more of the following flags. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueMeaning
+
D3DPRASTERCAPS_ANISOTROPY
+
+
+Device supports anisotropic filtering. + +
+
D3DPRASTERCAPS_COLORPERSPECTIVE
+
+
+Device iterates colors perspective correctly. + +
+
D3DPRASTERCAPS_DITHER
+
+
+Device can dither to improve color resolution. + +
+
D3DPRASTERCAPS_DEPTHBIAS
+
+
+Device supports legacy depth bias. For true depth bias, see D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS. + +
+
D3DPRASTERCAPS_FOGRANGE
+
+
+Device supports range-based fog. In range-based fog, the distance of an object from the viewer is used to compute fog effects, not the depth of the object (that is, the z-coordinate) in the scene. + +
+
D3DPRASTERCAPS_FOGTABLE
+
+
+Device calculates the fog value by referring to a lookup table containing fog values that are indexed to the depth of a given pixel. + +
+
D3DPRASTERCAPS_FOGVERTEX
+
+
+Device calculates the fog value during the lighting operation and interpolates the fog value during rasterization. + +
+
D3DPRASTERCAPS_MIPMAPLODBIAS
+
+
+Device supports level-of-detail bias adjustments. These bias adjustments enable an application to make a mipmap appear crisper or less sharp than it normally would. For more information about level-of-detail bias in mipmaps, see D3DSAMP_MIPMAPLODBIAS. + +
+
D3DPRASTERCAPS_MULTISAMPLE_TOGGLE
+
+
+Device supports toggling multisampling on and off between IDirect3DDevice9::BeginScene and IDirect3DDevice9::EndScene (using D3DRS_MULTISAMPLEANTIALIAS). + +
+
D3DPRASTERCAPS_SCISSORTEST
+
+
+Device supports scissor test. See Scissor Test (Direct3D 9). + +
+
D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS
+
+
+Device performs true slope-scale based depth bias. This is in contrast to the legacy style depth bias. + +
+
D3DPRASTERCAPS_WBUFFER
+
+
+Device supports depth buffering using w. + +
+
D3DPRASTERCAPS_WFOG
+
+
+Device supports w-based fog. W-based fog is used when a perspective projection matrix is specified, but affine projections still use z-based fog. The system considers a projection matrix that contains a nonzero value in the [3][4] element to be a perspective projection matrix. + +
+
D3DPRASTERCAPS_ZBUFFERLESSHSR
+
+
+Device can perform hidden-surface removal (HSR) without requiring the application to sort polygons and without requiring the allocation of a depth-buffer. This leaves more video memory for textures. The method used to perform HSR is hardware-dependent and is transparent to the application. + +Z-bufferless HSR is performed if no depth-buffer surface is associated with the rendering-target surface and the depth-buffer comparison test is enabled (that is, when the state value associated with the D3DRS_ZENABLE enumeration constant is set to TRUE). + +
+
D3DPRASTERCAPS_ZFOG
+
+
+Device supports z-based fog. + +
+
D3DPRASTERCAPS_ZTEST
+
+
+Device can perform z-test operations. This effectively renders a primitive and indicates whether any z pixels have been rendered. + +
+
+ + +Z-buffer comparison capabilities. This member can be one or more of the following flags. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueMeaning
+
D3DPCMPCAPS_ALWAYS
+
+
+Always pass the z-test. + +
+
D3DPCMPCAPS_EQUAL
+
+
+Pass the z-test if the new z equals the current z. + +
+
D3DPCMPCAPS_GREATER
+
+
+Pass the z-test if the new z is greater than the current z. + +
+
D3DPCMPCAPS_GREATEREQUAL
+
+
+Pass the z-test if the new z is greater than or equal to the current z. + +
+
D3DPCMPCAPS_LESS
+
+
+Pass the z-test if the new z is less than the current z. + +
+
D3DPCMPCAPS_LESSEQUAL
+
+
+Pass the z-test if the new z is less than or equal to the current z. + +
+
D3DPCMPCAPS_NEVER
+
+
+Always fail the z-test. + +
+
D3DPCMPCAPS_NOTEQUAL
+
+
+Pass the z-test if the new z does not equal the current z. + +
+
+ + +Source-blending capabilities. This member can be one or more of the following flags. (The RGBA values of the source and destination are indicated by the subscripts s and d.) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueMeaning
+
D3DPBLENDCAPS_BLENDFACTOR
+
+
+The driver supports both D3DBLEND_BLENDFACTOR and D3DBLEND_INVBLENDFACTOR. See D3DBLEND. + +
+
D3DPBLENDCAPS_BOTHINVSRCALPHA
+
+
+Source blend factor is (1 - Aₛ, 1 - Aₛ, 1 - Aₛ, 1 - Aₛ) and destination blend factor is (Aₛ, Aₛ, Aₛ, Aₛ); the destination blend selection is overridden. + +
+
D3DPBLENDCAPS_BOTHSRCALPHA
+
+
+The driver supports the D3DBLEND_BOTHSRCALPHA blend mode. (This blend mode is obsolete. For more information, see D3DBLEND.) + +
+
D3DPBLENDCAPS_DESTALPHA
+
+
+Blend factor is (Ad, Ad, Ad, Ad). + +
+
D3DPBLENDCAPS_DESTCOLOR
+
+
+Blend factor is (Rd, Gd, Bd, Ad). + +
+
D3DPBLENDCAPS_INVDESTALPHA
+
+
+Blend factor is (1 - Ad, 1 - Ad, 1 - Ad, 1 - Ad). + +
+
D3DPBLENDCAPS_INVDESTCOLOR
+
+
+Blend factor is (1 - Rd, 1 - Gd, 1 - Bd, 1 - Ad). + +
+
D3DPBLENDCAPS_INVSRCALPHA
+
+
+Blend factor is (1 - Aₛ, 1 - Aₛ, 1 - Aₛ, 1 - Aₛ). + +
+
D3DPBLENDCAPS_INVSRCCOLOR
+
+
+Blend factor is (1 - Rₛ, 1 - Gₛ, 1 - Bₛ, 1 - Aₛ). + +
+
D3DPBLENDCAPS_INVSRCCOLOR2
+
+
+Blend factor is (1 - PSOutColor[1]r, 1 - PSOutColor[1]g, 1 - PSOutColor[1]b, not used)). See Render Target Blending. + + + + + + +
+Differences between Direct3D 9 and Direct3D 9Ex: + +This flag is available in Direct3D 9Ex only. + +
+  + + + +
+
D3DPBLENDCAPS_ONE
+
+
+Blend factor is (1, 1, 1, 1). + +
+
D3DPBLENDCAPS_SRCALPHA
+
+
+Blend factor is (Aₛ, Aₛ, Aₛ, Aₛ). + +
+
D3DPBLENDCAPS_SRCALPHASAT
+
+
+Blend factor is (f, f, f, 1); f = min(Aₛ, 1 - Ad). + +
+
D3DPBLENDCAPS_SRCCOLOR
+
+
+Blend factor is (Rₛ, Gₛ, Bₛ, Aₛ). + +
+
D3DPBLENDCAPS_SRCCOLOR2
+
+
+Blend factor is (PSOutColor[1]r, PSOutColor[1]g, PSOutColor[1]b, not used). See Render Target Blending. + + + + + + +
+Differences between Direct3D 9 and Direct3D 9Ex: + +This flag is available in Direct3D 9Ex only. + +
+  + + + +
+
D3DPBLENDCAPS_ZERO
+
+
+Blend factor is (0, 0, 0, 0). + +
+
+ + Destination-blending capabilities. This member can be the same capabilities that are defined for the SrcBlendCaps member. + + + Alpha-test comparison capabilities. This member can include the same capability flags defined for the ZCmpCaps member. If this member contains only the D3DPCMPCAPS_ALWAYS capability or only the D3DPCMPCAPS_NEVER capability, the driver does not support alpha tests. Otherwise, the flags identify the individual comparisons that are supported for alpha testing. + + + Shading operations capabilities. It is assumed, in general, that if a device supports a given command at all, it supports the D3DSHADE_FLAT mode (as specified in the D3DSHADEMODE enumerated type). This flag specifies whether the driver can also support Gouraud shading and whether alpha color components are supported. When alpha components are not supported, the alpha value of colors generated is implicitly 255. This is the maximum possible alpha (that is, the alpha component is at full intensity). + +The color, specular highlights, fog, and alpha interpolants of a triangle each have capability flags that an application can use to find out how they are implemented by the device driver. + + +This member can be one or more of the following flags. + + + + + + + + + + + + + + + + + + + + + + + + +
ValueMeaning
+
D3DPSHADECAPS_ALPHAGOURAUDBLEND
+
+
+Device can support an alpha component for Gouraud-blended transparency (the D3DSHADE_GOURAUD state for the D3DSHADEMODE enumerated type). In this mode, the alpha color component of a primitive is provided at vertices and interpolated across a face along with the other color components. + +
+
D3DPSHADECAPS_COLORGOURAUDRGB
+
+
+Device can support colored Gouraud shading. In this mode, the per-vertex color components (red, green, and blue) are interpolated across a triangle face. + +
+
D3DPSHADECAPS_FOGGOURAUD
+
+
+Device can support fog in the Gouraud shading mode. + +
+
D3DPSHADECAPS_SPECULARGOURAUDRGB
+
+
+Device supports Gouraud shading of specular highlights. + +
+
+ + +Miscellaneous texture-mapping capabilities. This member can be one or more of the following flags. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueMeaning
+
D3DPTEXTURECAPS_ALPHA
+
+
+Alpha in texture pixels is supported. + +
+
D3DPTEXTURECAPS_ALPHAPALETTE
+
+
+Device can draw alpha from texture palettes. + +
+
D3DPTEXTURECAPS_CUBEMAP
+
+
+Supports cube textures. + +
+
D3DPTEXTURECAPS_CUBEMAP_POW2
+
+
+Device requires that cube texture maps have dimensions specified as powers of two. + +
+
D3DPTEXTURECAPS_MIPCUBEMAP
+
+
+Device supports mipmapped cube textures. + +
+
D3DPTEXTURECAPS_MIPMAP
+
+
+Device supports mipmapped textures. + +
+
D3DPTEXTURECAPS_MIPVOLUMEMAP
+
+
+Device supports mipmapped volume textures. + +
+
D3DPTEXTURECAPS_NONPOW2CONDITIONAL
+
+
+D3DPTEXTURECAPS_POW2 is also set, conditionally supports the use of 2D textures with dimensions that are not powers of two. A device that exposes this capability can use such a texture if all of the following requirements are met. + + +
    +
  • The texture addressing mode for the texture stage is set to D3DTADDRESS_CLAMP.
  • +
  • Texture wrapping for the texture stage is disabled (D3DRS_WRAP n set to 0).
  • +
  • Mipmapping is not in use (use magnification filter only).
  • +
  • Texture formats must not be D3DFMT_DXT1 through D3DFMT_DXT5.
  • +
+ + +If this flag is not set, and D3DPTEXTURECAPS_POW2 is also not set, then unconditional support is provided for 2D textures with dimensions that are not powers of two. + +A texture that is not a power of two cannot be set at a stage that will be read based on a shader computation (such as the bem - ps and texm3x3 - ps instructions in pixel shaders versions 1_0 to 1_3). For example, these textures can be used to store bumps that will be fed into texture reads, but not the environment maps that are used in texbem - ps, texbeml - ps, and texm3x3spec - ps. This means that a texture with dimensions that are not powers of two cannot be addressed or sampled using texture coordinates computed within the shader. This type of operation is known as a dependent read and cannot be performed on these types of textures. + +
+
D3DPTEXTURECAPS_NOPROJECTEDBUMPENV
+
+
+Device does not support a projected bump-environment loopkup operation in programmable and fixed function shaders. + +
+
D3DPTEXTURECAPS_PERSPECTIVE
+
+
+Perspective correction texturing is supported. + +
+
D3DPTEXTURECAPS_POW2
+
+
+If D3DPTEXTURECAPS_NONPOW2CONDITIONAL is not set, all textures must have widths and heights specified as powers of two. This requirement does not apply to either cube textures or volume textures. + +If D3DPTEXTURECAPS_NONPOW2CONDITIONAL is also set, conditionally supports the use of 2D textures with dimensions that are not powers of two. See D3DPTEXTURECAPS_NONPOW2CONDITIONAL description. + +If this flag is not set, and D3DPTEXTURECAPS_NONPOW2CONDITIONAL is also not set, then unconditional support is provided for 2D textures with dimensions that are not powers of two. + +
+
D3DPTEXTURECAPS_PROJECTED
+
+
+Supports the D3DTTFF_PROJECTED texture transformation flag. When applied, the device divides transformed texture coordinates by the last texture coordinate. If this capability is present, then the projective divide occurs per pixel. If this capability is not present, but the projective divide needs to occur anyway, then it is performed on a per-vertex basis by the Direct3D runtime. + +
+
D3DPTEXTURECAPS_SQUAREONLY
+
+
+All textures must be square. + +
+
D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE
+
+
+Texture indices are not scaled by the texture size prior to interpolation. + +
+
D3DPTEXTURECAPS_VOLUMEMAP
+
+
+Device supports volume textures. + +
+
D3DPTEXTURECAPS_VOLUMEMAP_POW2
+
+
+Device requires that volume texture maps have dimensions specified as powers of two. + +
+
+ + Texture-filtering capabilities for a texture. Per-stage filtering capabilities reflect which filtering modes are supported for texture stages when performing multiple-texture blending. This member can be any combination of the per-stage texture-filtering flags defined in D3DPTFILTERCAPS. + + + Texture-filtering capabilities for a cube texture. Per-stage filtering capabilities reflect which filtering modes are supported for texture stages when performing multiple-texture blending. This member can be any combination of the per-stage texture-filtering flags defined in D3DPTFILTERCAPS. + + + Texture-filtering capabilities for a volume texture. Per-stage filtering capabilities reflect which filtering modes are supported for texture stages when performing multiple-texture blending. This member can be any combination of the per-stage texture-filtering flags defined in D3DPTFILTERCAPS. + + + +Texture-addressing capabilities for texture objects. This member can be one or more of the following flags. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueMeaning
+
D3DPTADDRESSCAPS_BORDER
+
+
+Device supports setting coordinates outside the range [0.0, 1.0] to the border color, as specified by the D3DSAMP_BORDERCOLOR texture-stage state. + +
+
D3DPTADDRESSCAPS_CLAMP
+
+
+Device can clamp textures to addresses. + +
+
D3DPTADDRESSCAPS_INDEPENDENTUV
+
+
+Device can separate the texture-addressing modes of the u and v coordinates of the texture. This ability corresponds to the D3DSAMP_ADDRESSU and D3DSAMP_ADDRESSV render-state values. + +
+
D3DPTADDRESSCAPS_MIRROR
+
+
+Device can mirror textures to addresses. + +
+
D3DPTADDRESSCAPS_MIRRORONCE
+
+
+Device can take the absolute value of the texture coordinate (thus, mirroring around 0) and then clamp to the maximum value. + +
+
D3DPTADDRESSCAPS_WRAP
+
+
+Device can wrap textures to addresses. + +
+
+ + Texture-addressing capabilities for a volume texture. This member can be one or more of the flags defined for the TextureAddressCaps member. + + + +Defines the capabilities for line-drawing primitives. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueMeaning
+
D3DLINECAPS_ALPHACMP
+
+
+Supports alpha-test comparisons. + +
+
D3DLINECAPS_ANTIALIAS
+
+
+Antialiased lines are supported. + +
+
D3DLINECAPS_BLEND
+
+
+Supports source-blending. + +
+
D3DLINECAPS_FOG
+
+
+Supports fog. + +
+
D3DLINECAPS_TEXTURE
+
+
+Supports texture-mapping. + +
+
D3DLINECAPS_ZTEST
+
+
+Supports z-buffer comparisons. + +
+
+ + Maximum texture width for this device. + + + Maximum texture height for this device. + + + Maximum value for any of the three dimensions (width, height, and depth) of a volume texture. + + + This number represents the maximum range of the integer bits of the post-normalized texture coordinates. A texture coordinate is stored as a 32-bit signed integer using 27 bits to store the integer part and 5 bits for the floating point fraction. The maximum integer index, 2²⁷, is used to determine the maximum texture coordinate, depending on how the hardware does texture-coordinate scaling. + +Some hardware reports the cap D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE. For this case, the device defers scaling texture coordinates by the texture size until after interpolation and application of the texture address mode, so the number of times a texture can be wrapped is given by the integer value in MaxTextureRepeat. + +Less desirably, on some hardware D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE is not set and the device scales the texture coordinates by the texture size (using the highest level of detail) prior to interpolation. This limits the number of times a texture can be wrapped to MaxTextureRepeat / texture size. + +For example, assume that MaxTextureRepeat is equal to 32k and the size of the texture is 4k. If the hardware sets D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE, then the number of times a texture can be wrapped is equal to MaxTextureRepeat, which is 32k in this example. Otherwise, the number of times a texture can be wrapped is equal to MaxTextureRepeat divided by texture size, which is 32k/4k in this example. + + + Maximum texture aspect ratio supported by the hardware, typically a power of 2. + + + Maximum valid value for the D3DSAMP_MAXANISOTROPY texture-stage state. + + + Maximum W-based depth value that the device supports. + + + Screen-space coordinate of the guard-band clipping region. Coordinates inside this rectangle but outside the viewport rectangle are automatically clipped. + + + Screen-space coordinate of the guard-band clipping region. Coordinates inside this rectangle but outside the viewport rectangle are automatically clipped. + + + Screen-space coordinate of the guard-band clipping region. Coordinates inside this rectangle but outside the viewport rectangle are automatically clipped. + + + Screen-space coordinate of the guard-band clipping region. Coordinates inside this rectangle but outside the viewport rectangle are automatically clipped. + + + Number of pixels to adjust the extents rectangle outward to accommodate antialiasing kernels. + + + Flags specifying supported stencil-buffer operations. Stencil operations are assumed to be valid for all three stencil-buffer operation render states (D3DRS_STENCILFAIL, D3DRS_STENCILPASS, and D3DRS_STENCILZFAIL). + +For more information, see D3DSTENCILCAPS. + + + +Flexible vertex format capabilities. + + + + + + + + + + + + + + + + + + + + +
ValueMeaning
+
D3DFVFCAPS_DONOTSTRIPELEMENTS
+
+
+It is preferable that vertex elements not be stripped. That is, if the vertex format contains elements that are not used with the current render states, there is no need to regenerate the vertices. If this capability flag is not present, stripping extraneous elements from the vertex format provides better performance. + +
+
D3DFVFCAPS_PSIZE
+
+
+Point size is determined by either the render state or the vertex data. If an FVF is used, point size can come from point size data in the vertex declaration. Otherwise, point size is determined by the render state D3DRS_POINTSIZE. If the application provides point size in both (the render state and the vertex declaration), the vertex data overrides the render-state data. + +
+
D3DFVFCAPS_TEXCOORDCOUNTMASK
+
+
+Masks the low WORD of FVFCaps. These bits, cast to the WORD data type, describe the total number of texture coordinate sets that the device can simultaneously use for multiple texture blending. (You can use up to eight texture coordinate sets for any vertex, but the device can blend using only the specified number of texture coordinate sets.) + +
+
+ + +Combination of flags describing the texture operations supported by this device. The following flags are defined. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueMeaning
+
D3DTEXOPCAPS_ADD
+
+
+The D3DTOP_ADD texture-blending operation is supported. + +
+
D3DTEXOPCAPS_ADDSIGNED
+
+
+The D3DTOP_ADDSIGNED texture-blending operation is supported. + +
+
D3DTEXOPCAPS_ADDSIGNED2X
+
+
+The D3DTOP_ADDSIGNED2X texture-blending operation is supported. + +
+
D3DTEXOPCAPS_ADDSMOOTH
+
+
+The D3DTOP_ADDSMOOTH texture-blending operation is supported. + +
+
D3DTEXOPCAPS_BLENDCURRENTALPHA
+
+
+The D3DTOP_BLENDCURRENTALPHA texture-blending operation is supported. + +
+
D3DTEXOPCAPS_BLENDDIFFUSEALPHA
+
+
+The D3DTOP_BLENDDIFFUSEALPHA texture-blending operation is supported. + +
+
D3DTEXOPCAPS_BLENDFACTORALPHA
+
+
+The D3DTOP_BLENDFACTORALPHA texture-blending operation is supported. + +
+
D3DTEXOPCAPS_BLENDTEXTUREALPHA
+
+
+The D3DTOP_BLENDTEXTUREALPHA texture-blending operation is supported. + +
+
D3DTEXOPCAPS_BLENDTEXTUREALPHAPM
+
+
+The D3DTOP_BLENDTEXTUREALPHAPM texture-blending operation is supported. + +
+
D3DTEXOPCAPS_BUMPENVMAP
+
+
+The D3DTOP_BUMPENVMAP texture-blending operation is supported. + +
+
D3DTEXOPCAPS_BUMPENVMAPLUMINANCE
+
+
+The D3DTOP_BUMPENVMAPLUMINANCE texture-blending operation is supported. + +
+
D3DTEXOPCAPS_DISABLE
+
+
+The D3DTOP_DISABLE texture-blending operation is supported. + +
+
D3DTEXOPCAPS_DOTPRODUCT3
+
+
+The D3DTOP_DOTPRODUCT3 texture-blending operation is supported. + +
+
D3DTEXOPCAPS_LERP
+
+
+The D3DTOP_LERP texture-blending operation is supported. + +
+
D3DTEXOPCAPS_MODULATE
+
+
+The D3DTOP_MODULATE texture-blending operation is supported. + +
+
D3DTEXOPCAPS_MODULATE2X
+
+
+The D3DTOP_MODULATE2X texture-blending operation is supported. + +
+
D3DTEXOPCAPS_MODULATE4X
+
+
+The D3DTOP_MODULATE4X texture-blending operation is supported. + +
+
D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR
+
+
+The D3DTOP_MODULATEALPHA_ADDCOLOR texture-blending operation is supported. + +
+
D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA
+
+
+The D3DTOP_MODULATECOLOR_ADDALPHA texture-blending operation is supported. + +
+
D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR
+
+
+The D3DTOP_MODULATEINVALPHA_ADDCOLOR texture-blending operation is supported. + +
+
D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA
+
+
+The D3DTOP_MODULATEINVCOLOR_ADDALPHA texture-blending operation is supported. + +
+
D3DTEXOPCAPS_MULTIPLYADD
+
+
+The D3DTOP_MULTIPLYADD texture-blending operation is supported. + +
+
D3DTEXOPCAPS_PREMODULATE
+
+
+The D3DTOP_PREMODULATE texture-blending operation is supported. + +
+
D3DTEXOPCAPS_SELECTARG1
+
+
+The D3DTOP_SELECTARG1 texture-blending operation is supported. + +
+
D3DTEXOPCAPS_SELECTARG2
+
+
+The D3DTOP_SELECTARG2 texture-blending operation is supported. + +
+
D3DTEXOPCAPS_SUBTRACT
+
+
+The D3DTOP_SUBTRACT texture-blending operation is supported. + +
+
+ + Maximum number of texture-blending stages supported in the fixed function pipeline. This value is the number of blenders available. In the programmable pixel pipeline, this corresponds to the number of unique texture registers used by pixel shader instructions. + + + Maximum number of textures that can be simultaneously bound to the fixed-function pipeline sampler stages. If the same texture is bound to two sampler stages, it counts as two textures. + +This value has no meaning in the programmable pipeline where the number of sampler stages is determined by each pixel shader version. Each pixel shader version also determines the number of texture declaration instructions. See Pixel Shaders. + + + Vertex processing capabilities. For a given physical device, this capability might vary across Direct3D devices depending on the parameters supplied to CreateDevice. See D3DVTXPCAPS. + + + Maximum number of lights that can be active simultaneously. For a given physical device, this capability might vary across Direct3D devices depending on the parameters supplied to CreateDevice. + + + Maximum number of user-defined clipping planes supported. This member can be 0. For a given physical device, this capability may vary across Direct3D devices depending on the parameters supplied to CreateDevice. + + + Maximum number of matrices that this device can apply when performing multimatrix vertex blending. For a given physical device, this capability may vary across Direct3D devices depending on the parameters supplied to CreateDevice. + + + DWORD value that specifies the maximum matrix index that can be indexed into using the per-vertex indices. The number of matrices is MaxVertexBlendMatrixIndex + 1, which is the size of the matrix palette. If normals are present in the vertex data that needs to be blended for lighting, then the number of matrices is half the number specified by this capability flag. If MaxVertexBlendMatrixIndex is set to zero, the driver does not support indexed vertex blending. If this value is not zero then the valid range of indices is zero through MaxVertexBlendMatrixIndex. + +A zero value for MaxVertexBlendMatrixIndex indicates that the driver does not support indexed matrices. + +When software vertex processing is used, 256 matrices could be used for indexed vertex blending, with or without normal blending. + +For a given physical device, this capability may vary across Direct3D devices depending on the parameters supplied to CreateDevice. + + + Maximum size of a point primitive. If set to 1.0f then device does not support point size control. The range is greater than or equal to 1.0f. + + + Maximum number of primitives for each DrawPrimitive call. There are two cases: + + +
    +
  • If MaxPrimitiveCount is not equal to 0xffff, you can draw at most MaxPrimitiveCount primitives with each draw call.
  • +
  • However, if MaxPrimitiveCount equals 0xffff, you can still draw at most MaxPrimitiveCount primitive, but you may also use no more than MaxPrimitiveCount unique vertices (since each primitive can potentially use three different vertices).
  • +
+
+ + Maximum size of indices supported for hardware vertex processing. It is possible to create 32-bit index buffers; however, you will not be able to render with the index buffer unless this value is greater than 0x0000FFFF. + + + Maximum number of concurrent data streams for SetStreamSource. The valid range is 1 to 16. Note that if this value is 0, then the driver is not a Direct3D 9 driver. + + + Maximum stride for SetStreamSource. + + + Two numbers that represent the vertex shader main and sub versions. For more information about the instructions supported for each vertex shader version, see Version 1_x, Version 2_0, Version 2_0 Extended, or Version 3_0. + + + The number of vertex shader Vertex Shader Registers that are reserved for constants. + + + Two numbers that represent the pixel shader main and sub versions. For more information about the instructions supported for each pixel shader version, see Version 1_x, Version 2_0, Version 2_0 Extended, or Version 3_0. + + + Maximum value of pixel shader arithmetic component. This value indicates the internal range of values supported for pixel color blending operations. Within the range that they report to, implementations must allow data to pass through pixel processing unmodified (unclamped). Normally, the value of this member is an absolute value. For example, a 1.0 indicates that the range is -1.0 to 1, and an 8.0 indicates that the range is -8.0 to 8.0. The value must be >= 1.0 for any hardware that supports pixel shaders. + + + Device driver capabilities for adaptive tessellation. For more information, see D3DDEVCAPS2 + + + TBD + + + TBD + + + This number indicates which device is the master for this subordinate. This number is taken from the same space as the adapter values. + +For multihead support, one head will be denoted the master head, and all other heads on the same card will be denoted subordinate heads. If more than one multihead adapter is present in a system, the master and its subordinates from one multihead adapter are called a group. + + + This number indicates the order in which heads are referenced by the API. The value for the master adapter is always 0. These values do not correspond to the adapter ordinals. They apply only to heads within a group. + + + Number of adapters in this adapter group (only if master). This will be 1 for conventional adapters. The value will be greater than 1 for the master adapter of a multihead card. The value will be 0 for a subordinate adapter of a multihead card. Each card can have at most one master, but may have many subordinates. + + + A combination of one or more data types contained in a vertex declaration. See D3DDTCAPS. + + + Number of simultaneous render targets. This number must be at least one. + + + Combination of constants that describe the operations supported by StretchRect. The flags that may be set in this field are: + + + + + + + + + + + + + + + + + + + + + + +
ConstantDescription
D3DPTFILTERCAPS_MINFPOINTDevice supports point-sample filtering for minifying rectangles. This filter type is requested by calling StretchRect using D3DTEXF_POINT.
D3DPTFILTERCAPS_MAGFPOINTDevice supports point-sample filtering for magnifying rectangles. This filter type is requested by calling StretchRect using D3DTEXF_POINT.
D3DPTFILTERCAPS_MINFLINEARDevice supports bilinear interpolation filtering for minifying rectangles. This filter type is requested by calling StretchRect using D3DTEXF_LINEAR.
D3DPTFILTERCAPS_MAGFLINEARDevice supports bilinear interpolation filtering for magnifying rectangles. This filter type is requested by calling StretchRect using D3DTEXF_LINEAR.
+  + +For more information, see D3DTEXTUREFILTERTYPE and D3DTEXTUREFILTERTYPE.
+
+ + Device supports vertex shader version 2_0 extended capability. See D3DVSHADERCAPS2_0. + + + Device supports pixel shader version 2_0 extended capability. See D3DPSHADERCAPS2_0. + + + Device supports vertex shader texture filter capability. See D3DPTFILTERCAPS. + + + Maximum number of vertex shader instructions that can be run when using flow control. The maximum number of instructions that can be programmed is MaxVertexShader30InstructionSlots. + + + Maximum number of pixel shader instructions that can be run when using flow control. The maximum number of instructions that can be programmed is MaxPixelShader30InstructionSlots. + + + Maximum number of vertex shader instruction slots supported. The maximum value that can be set on this cap is 32768. Devices that support vs_3_0 are required to support at least 512 instruction slots. + + + Maximum number of pixel shader instruction slots supported. The maximum value that can be set on this cap is 32768. Devices that support ps_3_0 are required to support at least 512 instruction slots. + + + + Decompresses one or more shaders from a compressed set. + Microsoft Docs: + A pointer to uncompiled shader data; either ASCII HLSL code or a compiled effect. + Length of uncompiled shader data that pSrcData points to. + The number of shaders to decompress. + The index of the first shader to decompress. + An array of indexes that represent the shaders to decompress. + Flags that indicate how to decompress. Currently, no flags are defined. + The address of a pointer to the ID3DBlob interface that is used to retrieve the decompressed shader data. + A pointer to a variable that receives the total number of shaders that D3DDecompressShaders decompressed. + + + + + Defines a shader macro. + Microsoft Docs: + + + + The macro name. + + + The macro definition. + + + + Values that identify resource types that can be bound to a shader and that are reflected as part of the resource description for the shader. + Microsoft Docs: + + + + The shader resource is a constant buffer. + + + The shader resource is a texture buffer. + + + The shader resource is a texture. + + + The shader resource is a sampler. + + + The shader resource is a read-and-write buffer. + + + The shader resource is a structured buffer. + +For more information about structured buffer, see the Remarks section. + + + The shader resource is a read-and-write structured buffer. + + + The shader resource is a byte-address buffer. + + + The shader resource is a read-and-write byte-address buffer. + + + The shader resource is an append-structured buffer. + + + The shader resource is a consume-structured buffer. + + + The shader resource is a read-and-write structured buffer that uses the built-in counter to append or consume. + + + The shader resource is a constant buffer. + + + The shader resource is a texture buffer. + + + The shader resource is a texture. + + + The shader resource is a sampler. + + + The shader resource is a read-and-write buffer. + + + The shader resource is a structured buffer. + +For more information about structured buffer, see the Remarks section. + + + The shader resource is a read-and-write structured buffer. + + + The shader resource is a byte-address buffer. + + + The shader resource is a read-and-write byte-address buffer. + + + The shader resource is an append-structured buffer. + + + The shader resource is a consume-structured buffer. + + + The shader resource is a read-and-write structured buffer that uses the built-in counter to append or consume. + + + + Values that identify the class of a shader variable. + Microsoft Docs: + + + + The shader variable is a scalar. + + + The shader variable is a vector. + + + The shader variable is a row-major matrix. + + + The shader variable is a column-major matrix. + + + The shader variable is an object. + + + The shader variable is a structure. + + + The shader variable is a class. + + + The shader variable is an interface. + + + The shader variable is a scalar. + + + The shader variable is a vector. + + + The shader variable is a row-major matrix. + + + The shader variable is a column-major matrix. + + + The shader variable is an object. + + + The shader variable is a structure. + + + The shader variable is a class. + + + The shader variable is an interface. + + + This value is not used by a programmer; it exists to force the enumeration to compile to 32 bits. + + + + Disassembles compiled HLSL code. + Microsoft Docs: + A pointer to source data as compiled HLSL code. + Length of pSrcData. + + The comment string at the top of the shader that identifies the shader constants and variables. + A pointer to a buffer that receives the ID3DBlob interface that accesses assembly text. + + + + + Values that indicate the minimum desired interpolation precision. + Microsoft Docs: + + + + Default minimum precision, which is 32-bit precision. + + + Minimum precision is min16float, which is 16-bit floating point. + + + Minimum precision is min10float, which is 10-bit floating point. + + + Reserved + + + Minimum precision is min16int, which is 16-bit signed integer. + + + Minimum precision is min16uint, which is 16-bit unsigned integer. + + + Minimum precision is any 16-bit value. + + + Minimum precision is any 10-bit value. + + + + Vertex shader caps. + Microsoft Docs: + + + + Instruction predication is supported if this value is nonzero. See setp_comp - vs. + + + Either 0 or 24, which represents the depth of the dynamic flow control instruction nesting. See D3DVS20CAPS. + + + The number of temporary registers supported. See D3DVS20CAPS. + + + The depth of nesting of the loop - vs/rep - vs and call - vs/callnz bool - vs instructions. See D3DVS20CAPS. + + + + Driver type options. + Microsoft Docs: + + + + The driver type is unknown. + + + A hardware driver, which implements Direct3D features in hardware. This is the primary driver that you should use in your Direct3D applications because it provides the best performance. A hardware driver uses hardware acceleration (on supported hardware) but can also use software for parts of the pipeline that are not supported in hardware. This driver type is often referred to as a hardware abstraction layer or HAL. + + + A reference driver, which is a software implementation that supports every Direct3D feature. A reference driver is designed for accuracy rather than speed and as a result is slow but accurate. The rasterizer portion of the driver does make use of special CPU instructions whenever it can, but it is not intended for retail applications; use it only for feature testing, demonstration of functionality, debugging, or verifying bugs in other drivers. The reference device for this driver is installed by the Windows SDK 8.0 or later and is intended only as a debug aid for development purposes. This driver may be referred to as a REF driver, a reference driver, or a reference rasterizer. + +
Note  When you use the REF driver in Windows Store apps, the REF driver renders correctly but doesn't display any output on the screen. To verify bugs in hardware drivers for Windows Store apps, use D3D_DRIVER_TYPE_WARP for the WARP driver instead.
+
 
+
+ + A NULL driver, which is a reference driver without render capability. This driver is commonly used for debugging non-rendering API calls, it is not appropriate for retail applications. This driver is installed by the DirectX SDK. + + + A software driver, which is a driver implemented completely in software. The software implementation is not intended for a high-performance application due to its very slow performance. + + + A WARP driver, which is a high-performance software rasterizer. The rasterizer supports feature levels 9_1 through level 10_1 with a high performance software implementation. For information about limitations creating a WARP device on certain feature levels, see Limitations Creating WARP and Reference Devices. For more information about using a WARP driver, see Windows Advanced Rasterization Platform (WARP) In-Depth Guide. + +
Note  The WARP driver that Windows 8 includes supports feature levels 9_1 through level 11_1.
+
 
+
Note  The WARP driver that Windows 8.1 includes fully supports feature level 11_1, including tiled resources, IDXGIDevice3::Trim, shared BCn surfaces, minblend, and map default.
+
 
+
+ + + Writes a memory blob to a file on disk. + Microsoft Docs: + A pointer to a ID3DBlob interface that contains the memory blob to write to the file that the pFileName parameter specifies. + A pointer to a constant null-terminated string that contains the name of the file to which to write. + A Boolean value that specifies whether to overwrite information in the pFileName file. TRUE specifies to overwrite information and FALSE specifies not to overwrite information. + + + + + Specifies interpolation mode, which affects how values are calculated during rasterization. + Microsoft Docs: + + + + The interpolation mode is undefined. + + + Don't interpolate between register values. + + + Interpolate linearly between register values. + + + Interpolate linearly between register values but centroid clamped when multisampling. + + + Interpolate linearly between register values but with no perspective correction. + + + Interpolate linearly between register values but with no perspective correction and centroid clamped when multisampling. + + + Interpolate linearly between register values but sample clamped when multisampling. + + + Interpolate linearly between register values but with no perspective correction and sample clamped when multisampling. + + + + Sets information in a compilation result. + Microsoft Docs: + A pointer to compiled shader data. + The length of the compiled shader data that pSrcData points to. + A D3D_BLOB_PART-typed value that specifies the part to set. Currently, you can update only private data; that is, D3DSetBlobPart currently only supports the D3D_BLOB_PRIVATE_DATA value. + Flags that indicate how to set the blob part. Currently, no flags are defined; therefore, set to zero. + A pointer to data to set in the compilation result. + The length of the data that pPart points to. + A pointer to a buffer that receives the ID3DBlob interface for the new shader in which the new part data is set. + + + + + Retrieves the byte offsets for instructions within a section of shader code. + Microsoft Docs: + A pointer to the compiled shader data. + The size, in bytes, of the block of memory that pSrcData points to. + A combination of the following flags that are combined by using a bitwise OR operation. The resulting value specifies how D3DGetTraceInstructionOffsets retrieves the instruction offsets. + + + + + + + + + + +
FlagDescription
D3D_GET_INST_OFFSETS_INCLUDE_NON_EXECUTABLE (0x01)Include non-executable code in the retrieved information.
+ The index of the instruction in the compiled shader data for which D3DGetTraceInstructionOffsets starts to retrieve the byte offsets. + The number of instructions for which D3DGetTraceInstructionOffsets retrieves the byte offsets. + A pointer to a variable that receives the actual number of offsets. + A pointer to a variable that receives the total number of instructions in the section of shader code. +
+
+ + + Values that identify shader-input options. + Microsoft Docs: + + + + Assign a shader input to a register based on the register assignment in the HLSL code (instead of letting the compiler choose the register). + + + Use a comparison sampler, which uses the SampleCmp (DirectX HLSL Texture Object) and SampleCmpLevelZero (DirectX HLSL Texture Object) sampling functions. + + + A 2-bit value for encoding texture components. + + + A 2-bit value for encoding texture components. + + + A 2-bit value for encoding texture components. + + + This value is reserved. + + + Assign a shader input to a register based on the register assignment in the HLSL code (instead of letting the compiler choose the register). + + + Use a comparison sampler, which uses the SampleCmp (DirectX HLSL Texture Object) and SampleCmpLevelZero (DirectX HLSL Texture Object) sampling functions. + + + A 2-bit value for encoding texture components. + + + A 2-bit value for encoding texture components. + + + A 2-bit value for encoding texture components. + + + Forces the enumeration to compile to 32 bits. + This value is not used directly by titles. + + + + Describes the set of features targeted by a Direct3D device. + Microsoft Docs: + + + + Allows Microsoft Compute Driver Model (MCDM) devices to be used, or more feature-rich devices (such as traditional GPUs) that support a superset of the functionality. MCDM is the overall driver model for compute-only; it's a scaled-down peer of the larger scoped Windows Device Driver Model (WDDM). + + + Targets features supported by [feature level](/windows/desktop/direct3d11/overviews-direct3d-11-devices-downlevel-intro) 9.1, including shader model 2. + + + Targets features supported by [feature level](/windows/desktop/direct3d11/overviews-direct3d-11-devices-downlevel-intro) 9.2, including shader model 2. + + + Targets features supported by [feature level](/windows/desktop/direct3d11/overviews-direct3d-11-devices-downlevel-intro) 9.3, including shader model 2.0b. + + + Targets features supported by Direct3D 10.0, including shader model 4. + + + Targets features supported by Direct3D 10.1, including shader model 4. + + + Targets features supported by Direct3D 11.0, including shader model 5. + + + Targets features supported by Direct3D 11.1, including shader model 5 and logical blend operations. This feature level requires a display driver that is at least implemented to WDDM for Windows 8 (WDDM 1.2). + + + Targets features supported by Direct3D 12.0, including shader model 5. + + + Targets features supported by Direct3D 12.1, including shader model 5. + + + + Disassembles compiled HLSL code from a Direct3D10 effect. + Microsoft Docs: + A pointer to source data as compiled HLSL code. + Shader compile options. + A pointer to a buffer that receives the ID3DBlob interface that contains disassembly text. + + + + + Creates a shader module interface from source data for the shader module. + Microsoft Docs: + A pointer to the source data for the shader module. + The size, in bytes, of the block of memory that pSrcData points to. + A pointer to a variable that receives a pointer to the ID3D11Module interface that is used for shader resource re-binding. + + +
\ No newline at end of file diff --git a/src/Vortice.Win32/Generated/Graphics/Direct3D.cs b/src/Vortice.Win32/Generated/Graphics/Direct3D.cs index a6fe896..1e1be43 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct3D.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct3D.cs @@ -440,10 +440,10 @@ public enum IncludeType : int { /// /// D3D_INCLUDE_LOCAL - D3D_INCLUDE_LOCAL = 0, + Local = 0, /// /// D3D_INCLUDE_SYSTEM - D3D_INCLUDE_SYSTEM = 1, + System = 1, } /// @@ -452,46 +452,48 @@ public enum ShaderVariableClass : int { /// /// D3D_SVC_SCALAR - D3D_SVC_SCALAR = 0, + Scalar = 0, /// /// D3D_SVC_VECTOR - D3D_SVC_VECTOR = 1, + Vector = 1, /// /// D3D_SVC_MATRIX_ROWS - D3D_SVC_MATRIX_ROWS = 2, + MatrixRows = 2, /// /// D3D_SVC_MATRIX_COLUMNS - D3D_SVC_MATRIX_COLUMNS = 3, + MatrixColumns = 3, /// /// D3D_SVC_OBJECT - D3D_SVC_OBJECT = 4, + Object = 4, /// /// D3D_SVC_STRUCT - D3D_SVC_STRUCT = 5, + Struct = 5, /// /// D3D_SVC_INTERFACE_CLASS - D3D_SVC_INTERFACE_CLASS = 6, + InterfaceClass = 6, /// /// D3D_SVC_INTERFACE_POINTER - D3D_SVC_INTERFACE_POINTER = 7, + InterfacePointer = 7, } /// /// D3D_SHADER_VARIABLE_FLAGS +[Flags] public enum ShaderVariableFlags : int { + None = 0, /// /// D3D_SVF_USERPACKED - D3D_SVF_USERPACKED = 1, + UserPacked = 1, /// /// D3D_SVF_USED - D3D_SVF_USED = 2, + Used = 2, /// /// D3D_SVF_INTERFACE_POINTER - D3D_SVF_INTERFACE_POINTER = 4, + InterfacePointer = 4, /// /// D3D_SVF_INTERFACE_PARAMETER - D3D_SVF_INTERFACE_PARAMETER = 8, + InterfaceParameter = 8, } /// @@ -500,217 +502,219 @@ public enum ShaderVariableType : int { /// /// D3D_SVT_VOID - D3D_SVT_VOID = 0, + Void = 0, /// /// D3D_SVT_BOOL - D3D_SVT_BOOL = 1, + Bool = 1, /// /// D3D_SVT_INT - D3D_SVT_INT = 2, + Int = 2, /// /// D3D_SVT_FLOAT - D3D_SVT_FLOAT = 3, + Float = 3, /// /// D3D_SVT_STRING - D3D_SVT_STRING = 4, + String = 4, /// /// D3D_SVT_TEXTURE - D3D_SVT_TEXTURE = 5, + Texture = 5, /// /// D3D_SVT_TEXTURE1D - D3D_SVT_TEXTURE1D = 6, + Texture1D = 6, /// /// D3D_SVT_TEXTURE2D - D3D_SVT_TEXTURE2D = 7, + Texture2D = 7, /// /// D3D_SVT_TEXTURE3D - D3D_SVT_TEXTURE3D = 8, + Texture3D = 8, /// /// D3D_SVT_TEXTURECUBE - D3D_SVT_TEXTURECUBE = 9, + TextureCube = 9, /// /// D3D_SVT_SAMPLER - D3D_SVT_SAMPLER = 10, + Sampler = 10, /// /// D3D_SVT_SAMPLER1D - D3D_SVT_SAMPLER1D = 11, + Sampler1D = 11, /// /// D3D_SVT_SAMPLER2D - D3D_SVT_SAMPLER2D = 12, + Sampler2D = 12, /// /// D3D_SVT_SAMPLER3D - D3D_SVT_SAMPLER3D = 13, + Sampler3D = 13, /// /// D3D_SVT_SAMPLERCUBE - D3D_SVT_SAMPLERCUBE = 14, + SamplerCube = 14, /// /// D3D_SVT_PIXELSHADER - D3D_SVT_PIXELSHADER = 15, + PixelShader = 15, /// /// D3D_SVT_VERTEXSHADER - D3D_SVT_VERTEXSHADER = 16, + VertexShader = 16, /// /// D3D_SVT_PIXELFRAGMENT - D3D_SVT_PIXELFRAGMENT = 17, + PixelFragment = 17, /// /// D3D_SVT_VERTEXFRAGMENT - D3D_SVT_VERTEXFRAGMENT = 18, + VertexFragment = 18, /// /// D3D_SVT_UINT - D3D_SVT_UINT = 19, + Uint = 19, /// /// D3D_SVT_UINT8 - D3D_SVT_UINT8 = 20, + Uint8 = 20, /// /// D3D_SVT_GEOMETRYSHADER - D3D_SVT_GEOMETRYSHADER = 21, + GeometryShader = 21, /// /// D3D_SVT_RASTERIZER - D3D_SVT_RASTERIZER = 22, + Rasterizer = 22, /// /// D3D_SVT_DEPTHSTENCIL - D3D_SVT_DEPTHSTENCIL = 23, + DepthStencil = 23, /// /// D3D_SVT_BLEND - D3D_SVT_BLEND = 24, + Blend = 24, /// /// D3D_SVT_BUFFER - D3D_SVT_BUFFER = 25, + Buffer = 25, /// /// D3D_SVT_CBUFFER - D3D_SVT_CBUFFER = 26, + CBuffer = 26, /// /// D3D_SVT_TBUFFER - D3D_SVT_TBUFFER = 27, + TBuffer = 27, /// /// D3D_SVT_TEXTURE1DARRAY - D3D_SVT_TEXTURE1DARRAY = 28, + Texture1DArray = 28, /// /// D3D_SVT_TEXTURE2DARRAY - D3D_SVT_TEXTURE2DARRAY = 29, + Texture2DArray = 29, /// /// D3D_SVT_RENDERTARGETVIEW - D3D_SVT_RENDERTARGETVIEW = 30, + RenderTargetView = 30, /// /// D3D_SVT_DEPTHSTENCILVIEW - D3D_SVT_DEPTHSTENCILVIEW = 31, + DepthStencilView = 31, /// /// D3D_SVT_TEXTURE2DMS - D3D_SVT_TEXTURE2DMS = 32, + Texture2DMs = 32, /// /// D3D_SVT_TEXTURE2DMSARRAY - D3D_SVT_TEXTURE2DMSARRAY = 33, + Texture2DMsArray = 33, /// /// D3D_SVT_TEXTURECUBEARRAY - D3D_SVT_TEXTURECUBEARRAY = 34, + TextureCubeArray = 34, /// /// D3D_SVT_HULLSHADER - D3D_SVT_HULLSHADER = 35, + Hullshader = 35, /// /// D3D_SVT_DOMAINSHADER - D3D_SVT_DOMAINSHADER = 36, + DomainShader = 36, /// /// D3D_SVT_INTERFACE_POINTER - D3D_SVT_INTERFACE_POINTER = 37, + InterfacePointer = 37, /// /// D3D_SVT_COMPUTESHADER - D3D_SVT_COMPUTESHADER = 38, + ComputeShader = 38, /// /// D3D_SVT_DOUBLE - D3D_SVT_DOUBLE = 39, + Double = 39, /// /// D3D_SVT_RWTEXTURE1D - D3D_SVT_RWTEXTURE1D = 40, + RwTexture1D = 40, /// /// D3D_SVT_RWTEXTURE1DARRAY - D3D_SVT_RWTEXTURE1DARRAY = 41, + RwTexture1DArray = 41, /// /// D3D_SVT_RWTEXTURE2D - D3D_SVT_RWTEXTURE2D = 42, + RwTexture2D = 42, /// /// D3D_SVT_RWTEXTURE2DARRAY - D3D_SVT_RWTEXTURE2DARRAY = 43, + RwTexture2DArray = 43, /// /// D3D_SVT_RWTEXTURE3D - D3D_SVT_RWTEXTURE3D = 44, + RwTexture3D = 44, /// /// D3D_SVT_RWBUFFER - D3D_SVT_RWBUFFER = 45, + RwBuffer = 45, /// /// D3D_SVT_BYTEADDRESS_BUFFER - D3D_SVT_BYTEADDRESS_BUFFER = 46, + ByteAddressBuffer = 46, /// /// D3D_SVT_RWBYTEADDRESS_BUFFER - D3D_SVT_RWBYTEADDRESS_BUFFER = 47, + RwByteAddressBuffer = 47, /// /// D3D_SVT_STRUCTURED_BUFFER - D3D_SVT_STRUCTURED_BUFFER = 48, + StructuredBuffer = 48, /// /// D3D_SVT_RWSTRUCTURED_BUFFER - D3D_SVT_RWSTRUCTURED_BUFFER = 49, + RwStructuredBuffer = 49, /// /// D3D_SVT_APPEND_STRUCTURED_BUFFER - D3D_SVT_APPEND_STRUCTURED_BUFFER = 50, + AppendStructuredBuffer = 50, /// /// D3D_SVT_CONSUME_STRUCTURED_BUFFER - D3D_SVT_CONSUME_STRUCTURED_BUFFER = 51, + ConsumeStructuredBuffer = 51, /// /// D3D_SVT_MIN8FLOAT - D3D_SVT_MIN8FLOAT = 52, + Min8Float = 52, /// /// D3D_SVT_MIN10FLOAT - D3D_SVT_MIN10FLOAT = 53, + Min10Float = 53, /// /// D3D_SVT_MIN16FLOAT - D3D_SVT_MIN16FLOAT = 54, + Min16Float = 54, /// /// D3D_SVT_MIN12INT - D3D_SVT_MIN12INT = 55, + Min12Int = 55, /// /// D3D_SVT_MIN16INT - D3D_SVT_MIN16INT = 56, + Min16Int = 56, /// /// D3D_SVT_MIN16UINT - D3D_SVT_MIN16UINT = 57, + Min16Uint = 57, /// /// D3D_SVT_INT16 - D3D_SVT_INT16 = 58, + Int16 = 58, /// /// D3D_SVT_UINT16 - D3D_SVT_UINT16 = 59, + Uint16 = 59, /// /// D3D_SVT_FLOAT16 - D3D_SVT_FLOAT16 = 60, + Float16 = 60, /// /// D3D_SVT_INT64 - D3D_SVT_INT64 = 61, + Int64 = 61, /// /// D3D_SVT_UINT64 - D3D_SVT_UINT64 = 62, + Uint64 = 62, } /// /// D3D_SHADER_INPUT_FLAGS +[Flags] public enum ShaderInputFlags : int { + None = 0, /// /// D3D_SIF_USERPACKED - D3D_SIF_USERPACKED = 1, + UserPacked = 1, /// /// D3D_SIF_COMPARISON_SAMPLER - D3D_SIF_COMPARISON_SAMPLER = 2, + ComparisonSampler = 2, /// /// D3D_SIF_TEXTURE_COMPONENT_0 - D3D_SIF_TEXTURE_COMPONENT_0 = 4, + TextureComponent0 = 4, /// /// D3D_SIF_TEXTURE_COMPONENT_1 - D3D_SIF_TEXTURE_COMPONENT_1 = 8, + TextureComponent1 = 8, /// /// D3D_SIF_TEXTURE_COMPONENTS - D3D_SIF_TEXTURE_COMPONENTS = 12, + TextureComponents = 12, /// /// D3D_SIF_UNUSED - D3D_SIF_UNUSED = 16, + Unused = 16, } /// @@ -719,73 +723,75 @@ public enum ShaderInputType : int { /// /// D3D_SIT_CBUFFER - D3D_SIT_CBUFFER = 0, + CBuffer = 0, /// /// D3D_SIT_TBUFFER - D3D_SIT_TBUFFER = 1, + TBuffer = 1, /// /// D3D_SIT_TEXTURE - D3D_SIT_TEXTURE = 2, + Texture = 2, /// /// D3D_SIT_SAMPLER - D3D_SIT_SAMPLER = 3, + Sampler = 3, /// /// D3D_SIT_UAV_RWTYPED - D3D_SIT_UAV_RWTYPED = 4, + UavRwTyped = 4, /// /// D3D_SIT_STRUCTURED - D3D_SIT_STRUCTURED = 5, + Structured = 5, /// /// D3D_SIT_UAV_RWSTRUCTURED - D3D_SIT_UAV_RWSTRUCTURED = 6, + UavRwStructured = 6, /// /// D3D_SIT_BYTEADDRESS - D3D_SIT_BYTEADDRESS = 7, + ByteAddress = 7, /// /// D3D_SIT_UAV_RWBYTEADDRESS - D3D_SIT_UAV_RWBYTEADDRESS = 8, + UavRwByteAddress = 8, /// /// D3D_SIT_UAV_APPEND_STRUCTURED - D3D_SIT_UAV_APPEND_STRUCTURED = 9, + UavAppendStructured = 9, /// /// D3D_SIT_UAV_CONSUME_STRUCTURED - D3D_SIT_UAV_CONSUME_STRUCTURED = 10, + UavConsumeStructured = 10, /// /// D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER - D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER = 11, + UavRwStructuredWithCounter = 11, /// /// D3D_SIT_RTACCELERATIONSTRUCTURE - D3D_SIT_RTACCELERATIONSTRUCTURE = 12, + RtAccelerationStructure = 12, /// /// D3D_SIT_UAV_FEEDBACKTEXTURE - D3D_SIT_UAV_FEEDBACKTEXTURE = 13, + UavFeedbackTexture = 13, } /// /// D3D_SHADER_CBUFFER_FLAGS -public enum ShaderCbufferFlags : int +[Flags] +public enum ShaderCBufferFlags : int { + None = 0, /// /// D3D_CBF_USERPACKED - D3D_CBF_USERPACKED = 1, + UserPacked = 1, } /// /// D3D_CBUFFER_TYPE -public enum CbufferType : int +public enum CBufferType : int { /// /// D3D_CT_CBUFFER - D3D_CT_CBUFFER = 0, + CBuffer = 0, /// /// D3D_CT_TBUFFER - D3D_CT_TBUFFER = 1, + TBuffer = 1, /// /// D3D_CT_INTERFACE_POINTERS - D3D_CT_INTERFACE_POINTERS = 2, + InterfacePointers = 2, /// /// D3D_CT_RESOURCE_BIND_INFO - D3D_CT_RESOURCE_BIND_INFO = 3, + ResourceBindInfo = 3, } /// @@ -827,31 +833,31 @@ public enum Name : int SampleIndex = 10, /// /// D3D_NAME_FINAL_QUAD_EDGE_TESSFACTOR - FinalQuadEdgeTessfactor = 11, + FinalQuadEdgeTessFactor = 11, /// /// D3D_NAME_FINAL_QUAD_INSIDE_TESSFACTOR - FinalQuadInsideTessfactor = 12, + FinalQuadInsideTessFactor = 12, /// /// D3D_NAME_FINAL_TRI_EDGE_TESSFACTOR - FinalTriEdgeTessfactor = 13, + FinalTriEdgeTessFactor = 13, /// /// D3D_NAME_FINAL_TRI_INSIDE_TESSFACTOR - FinalTriInsideTessfactor = 14, + FinalTriInsideTessFactor = 14, /// /// D3D_NAME_FINAL_LINE_DETAIL_TESSFACTOR - FinalLineDetailTessfactor = 15, + FinalLineDetailTessFactor = 15, /// /// D3D_NAME_FINAL_LINE_DENSITY_TESSFACTOR - FinalLineDensityTessfactor = 16, + FinalLineDensityTessFactor = 16, /// /// D3D_NAME_BARYCENTRICS Barycentrics = 23, /// /// D3D_NAME_SHADINGRATE - Shadingrate = 24, + ShadingRate = 24, /// /// D3D_NAME_CULLPRIMITIVE - Cullprimitive = 25, + CullPrimitive = 25, /// /// D3D_NAME_TARGET Target = 64, @@ -873,15 +879,6 @@ public enum Name : int /// /// D3D_NAME_INNER_COVERAGE InnerCoverage = 70, - /// - /// D3D12_NAME_BARYCENTRICS - D3D12_NAME_BARYCENTRICS = 23, - /// - /// D3D12_NAME_SHADINGRATE - D3D12_NAME_SHADINGRATE = 24, - /// - /// D3D12_NAME_CULLPRIMITIVE - D3D12_NAME_CULLPRIMITIVE = 25, } /// @@ -1054,6 +1051,7 @@ public enum InterpolationMode : int /// /// D3D_PARAMETER_FLAGS +[Flags] public enum ParameterFlags : int { /// @@ -1242,12 +1240,12 @@ public unsafe partial struct ID3DDestructionNotifier : ID3DDestructionNotifier.I /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(3)] - public HResult RegisterDestructionCallback(PFN_DESTRUCTION_CALLBACK callbackFn, void* pData, uint* pCallbackID) + public HResult RegisterDestructionCallback(delegate* unmanaged[Stdcall] callbackFn, void* pData, uint* pCallbackID) { #if NET6_0_OR_GREATER - return ((delegate* unmanaged)(lpVtbl[3]))((ID3DDestructionNotifier*)Unsafe.AsPointer(ref this), callbackFn, pData, pCallbackID); + return ((delegate* unmanaged, void*, uint*, int>)(lpVtbl[3]))((ID3DDestructionNotifier*)Unsafe.AsPointer(ref this), callbackFn, pData, pCallbackID); #else - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID3DDestructionNotifier*)Unsafe.AsPointer(ref this), callbackFn, pData, pCallbackID); + return ((delegate* unmanaged[Stdcall], void*, uint*, int>)(lpVtbl[3]))((ID3DDestructionNotifier*)Unsafe.AsPointer(ref this), callbackFn, pData, pCallbackID); #endif } diff --git a/src/Vortice.Win32/Generated/Graphics/Dxgi.cs b/src/Vortice.Win32/Generated/Graphics/Dxgi.cs index f1a8de4..9ec8477 100644 --- a/src/Vortice.Win32/Generated/Graphics/Dxgi.cs +++ b/src/Vortice.Win32/Generated/Graphics/Dxgi.cs @@ -122,8 +122,10 @@ public enum SwapEffect : int /// /// DXGI_SWAP_CHAIN_FLAG +[Flags] public enum SwapChainFlags : int { + None = 0, /// /// DXGI_SWAP_CHAIN_FLAG_NONPREROTATED NonPrerotated = 1, @@ -270,8 +272,10 @@ public enum ComputePreemptionGranularity : int /// /// DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS +[Flags] public enum MultiplaneOverlayYcbcrFlags : int { + None = 0, /// /// DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_NOMINAL_RANGE YcbcrFlagNominalRange = 1, @@ -372,8 +376,10 @@ public enum HdrMetadataType : int /// /// DXGI_OFFER_RESOURCE_FLAGS +[Flags] public enum OfferResourceFlags : int { + None = 0, /// /// DXGI_OFFER_RESOURCE_FLAG_ALLOW_DECOMMIT AllowDecommit = 1, diff --git a/src/samples/01-ClearScreen/Program.cs b/src/samples/01-ClearScreen/Program.cs index 8a83346..aaa51b7 100644 --- a/src/samples/01-ClearScreen/Program.cs +++ b/src/samples/01-ClearScreen/Program.cs @@ -12,9 +12,6 @@ public static unsafe class Program { public static void Main() { - string test = StringUtilities.GetString(new sbyte[] { (sbyte)'A', (sbyte)'B', (sbyte)'C' }); - test = StringUtilities.GetString(new ushort[] { 'A', 'B', 'C' }); - using ComPtr factory = default; HResult hr = CreateDXGIFactory1(__uuidof(), (void**)&factory);