Home | History | Annotate | Download | only in d3d
      1 #ifndef LIBGLESV2_RENDERER_HLSL_D3DCOMPILER_H_
      2 #define LIBGLESV2_RENDERER_HLSL_D3DCOMPILER_H_
      3 
      4 #include "common/angleutils.h"
      5 
      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,
     27                                 const UINT optimizationFlags[], const char *flagNames[], int attempts) const;
     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_
     39