// Copyright (c) Wojciech Figat. All rights reserved. #pragma once #if COMPILE_WITH_DX_SHADER_COMPILER #include "Engine/ShadersCompilation/ShaderCompiler.h" /// /// Implementation of shaders compiler for DirectX platform using https://github.com/microsoft/DirectXShaderCompiler. /// class ShaderCompilerDX : public ShaderCompiler { private: Array _funcNameDefineBuffer; void* _compiler; void* _library; void* _builder; void* _containerReflection; public: /// /// Initializes a new instance of the class. /// /// The profile. /// The platform. /// The custom DXC Compiler factory function. ShaderCompilerDX(ShaderProfile profile, PlatformType platform = (PlatformType)0, void* dxcCreateInstanceProc = nullptr); /// /// Finalizes an instance of the class. /// ~ShaderCompilerDX(); protected: virtual void GetArgs(ShaderFunctionMeta& meta, Array>& args) { } // [ShaderCompiler] bool CompileShader(ShaderFunctionMeta& meta, WritePermutationData customDataWrite = nullptr) override; bool OnCompileBegin() override; }; #endif