Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::IDXCompiler Class Referenceabstract

DXC compiler interface. More...

#include <DXCompiler.hpp>

Public Member Functions

virtual bool Compile (const CompileAttribs &Attribs)=0
 
virtual bool RemapResourceBindings (const TResourceBindingMap &ResourceMap, IDxcBlob *pSrcBytecode, IDxcBlob **ppDstByteCode)=0
 
virtual void GetD3D12ShaderReflection (IDxcBlob *pShaderBytecode, ID3D12ShaderReflection **ppShaderReflection)=0
 Attempts to extract shader reflection from the bytecode using DXC.
 

Detailed Description

DXC compiler interface.

Member Function Documentation

◆ Compile()

virtual bool Diligent::IDXCompiler::Compile ( const CompileAttribs & Attribs)
pure virtual

Compiles HLSL source code to DXIL or SPIRV.

Remarks
The method is thread-safe. For each compilation, the method creates a new IDxcCompiler instance.

◆ RemapResourceBindings()

virtual bool Diligent::IDXCompiler::RemapResourceBindings ( const TResourceBindingMap & ResourceMap,
IDxcBlob * pSrcBytecode,
IDxcBlob ** ppDstByteCode )
pure virtual
Parameters
[in]ResourceMap- Resource binding map. For every resource in the source byte code it must define the binding (shader register and space).
[in]pSrcBytecode- Source byte code.
[out]ppDstByteCode- Memory location where the pointer to the byte code with the remapped bindings will be written.
Returns
true if the remapping was successful, and false otherwise.