D3DX11CreateAsyncCompilerProcessor function
Note
The D3DX (D3DX 9, D3DX 10, and D3DX 11) utility library is deprecated for Windows 8 and is not supported for Windows Store apps. See Remarks.
Create an asynchronous-data processor for a shader.
Syntax
HRESULT D3DX11CreateAsyncCompilerProcessor(
_In_ LPCSTR pFileName,
_In_ const D3D11_SHADER_MACRO *pDefines,
_In_ LPD3D10INCLUDE pInclude,
_In_ LPCSTR pFunctionName,
_In_ LPCSTR pProfile,
_In_ UINT Flags1,
_In_ UINT Flags2,
_Out_ ID3D10Blob **ppCompiledShader,
_Out_ ID3D10Blob **ppErrorBuffer,
_Out_ ID3DX11DataProcessor **ppDataProcessor
);
Parameters
-
pFileName [in]
-
Type: LPCSTR
A string that contains the shader filename.
-
pDefines [in]
-
Type: const D3D11_SHADER_MACRO*
A NULL-terminated array of shader macros; set this to NULL to specify no macros.
-
pInclude [in]
-
Type: LPD3D10INCLUDE
A pointer to an include interface. This parameter can be NULL.
-
pFunctionName [in]
-
Type: LPCSTR
Name of the shader-entry point function where shader execution begins. When you compile an effect, D3DX11CreateAsyncCompilerProcessor ignores pFunctionName; we recommend that you set pFunctionName to NULL because it is good programming practice to set a pointer parameter to NULL if the called function will not use it..
-
pProfile [in]
-
Type: LPCSTR
A string that specifies the shader profile or shader model; can be any profile in shader model 2, shader model 3, shader model 4, or shader model 5. The profile can also be for effect type (for example, fx_4_1).
-
Flags1 [in]
-
Type: UINT
Shader compile flags.
-
Flags2 [in]
-
Type: UINT
Effect compile flags. When you compile a shader and not an effect file, D3DX11CreateAsyncCompilerProcessor 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.
-
ppCompiledShader [out]
-
Type: ID3D10Blob**
Address of a pointer to the compiled effect.
-
ppErrorBuffer [out]
-
Type: ID3D10Blob**
Address of a pointer to compile errors.
-
ppDataProcessor [out]
-
Type: ID3DX11DataProcessor**
Address of a pointer to a buffer that contains the data processor created (see ID3DX11DataProcessor Interface).
Return value
Type: HRESULT
The return value is one of the values listed in Direct3D 11 Return Codes.
Remarks
There s no implementation of the async loader outside of D3DX 10, and D3DX 11.
For Windows Store apps, the DirectX samples (for example, the Direct3D tutorial sample) include the BasicLoader module that uses the Windows Runtime asynchronous programming model (AsyncBase).
For Win32 desktop apps, you can use the Concurrency Runtime to implement something similar to the Windows Runtime asynchronous programming model.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|