* Initialize the shader compiler. */
| 649 | * Initialize the shader compiler. |
| 650 | */ |
| 651 | void InitShaderCompiler(D3D12ShaderCompilerInfo &shaderCompiler) |
| 652 | { |
| 653 | HRESULT hr = shaderCompiler.DxcDllHelper.Initialize(); |
| 654 | Utils::Validate(hr, L"Failed to initialize DxCDllSupport!"); |
| 655 | |
| 656 | hr = shaderCompiler.DxcDllHelper.CreateInstance(CLSID_DxcCompiler, &shaderCompiler.compiler); |
| 657 | Utils::Validate(hr, L"Failed to create DxcCompiler!"); |
| 658 | |
| 659 | hr = shaderCompiler.DxcDllHelper.CreateInstance(CLSID_DxcLibrary, &shaderCompiler.library); |
| 660 | Utils::Validate(hr, L"Failed to create DxcLibrary!"); |
| 661 | } |
| 662 | |
| 663 | /** |
| 664 | * Release shader compiler resources. |
no test coverage detected