Geoff Lang | dad5ed3 | 2014-02-10 12:59:17 -0500 | [diff] [blame] | 1 | #ifndef LIBGLESV2_RENDERER_HLSL_D3DCOMPILER_H_ |
| 2 | #define LIBGLESV2_RENDERER_HLSL_D3DCOMPILER_H_ |
| 3 | |
| 4 | #include "common/angleutils.h" |
| 5 | |
Geoff Lang | dad5ed3 | 2014-02-10 12:59:17 -0500 | [diff] [blame] | 6 | namespace gl |
| 7 | { |
| 8 | class InfoLog; |
| 9 | } |
| 10 | |
| 11 | namespace rx |
| 12 | { |
| 13 | |
| 14 | typedef void* ShaderBlob; |
| 15 | typedef void(*CompileFuncPtr)(); |
| 16 | |
| 17 | class 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 Capens | 93faad9 | 2014-05-10 12:14:13 -0400 | [diff] [blame] | 27 | const UINT optimizationFlags[], const char *flagNames[], int attempts) const; |
Geoff Lang | dad5ed3 | 2014-02-10 12:59:17 -0500 | [diff] [blame] | 28 | |
| 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_ |