MCPcopy Create free account
hub / github.com/Apress/Ray-Tracing-Gems-II / InitShaderCompiler

Function InitShaderCompiler

Chapter_14/src/Graphics.cpp:651–661  ·  view source on GitHub ↗

* Initialize the shader compiler. */

Source from the content-addressed store, hash-verified

649* Initialize the shader compiler.
650*/
651void 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.

Callers 1

InitMethod · 0.85

Calls 2

ValidateFunction · 0.85
InitializeMethod · 0.45

Tested by

no test coverage detected