blob: 0ce9e44be54dc1c74ab1c015966b4e643d5fa2af [file] [log] [blame]
Geoff Langdad5ed32014-02-10 12:59:17 -05001#ifndef LIBGLESV2_RENDERER_HLSL_D3DCOMPILER_H_
2#define LIBGLESV2_RENDERER_HLSL_D3DCOMPILER_H_
3
4#include "common/angleutils.h"
5
Geoff Langdad5ed32014-02-10 12:59:17 -05006namespace gl
7{
8class InfoLog;
9}
10
11namespace rx
12{
13
14typedef void* ShaderBlob;
15typedef void(*CompileFuncPtr)();
16
17class HLSLCompiler
18{
19 public:
20 HLSLCompiler();
21 ~HLSLCompiler();
22
23 bool initialize();
24 void release();
25
26 ShaderBlob *compileToBinary(gl::InfoLog &infoLog, const char *hlsl, const char *profile,
Nicolas Capens93faad92014-05-10 12:14:13 -040027 const UINT optimizationFlags[], const char *flagNames[], int attempts) const;
Geoff Langdad5ed32014-02-10 12:59:17 -050028
29 private:
30 DISALLOW_COPY_AND_ASSIGN(HLSLCompiler);
31
32 HMODULE mD3DCompilerModule;
33 CompileFuncPtr mD3DCompileFunc;
34};
35
36}
37
38#endif // LIBGLESV2_RENDERER_HLSL_D3DCOMPILER_H_