Home | History | Annotate | Download | only in d3d11
      1 //
      2 // Copyright (c) 2012-2014 The ANGLE Project Authors. All rights reserved.
      3 // Use of this source code is governed by a BSD-style license that can be
      4 // found in the LICENSE file.
      5 //
      6 
      7 // ShaderExecutable11.h: Defines a D3D11-specific class to contain shader
      8 // executable implementation details.
      9 
     10 #ifndef LIBGLESV2_RENDERER_SHADEREXECUTABLE11_H_
     11 #define LIBGLESV2_RENDERER_SHADEREXECUTABLE11_H_
     12 
     13 #include "libGLESv2/renderer/ShaderExecutable.h"
     14 
     15 namespace rx
     16 {
     17 class Renderer11;
     18 class UniformStorage11;
     19 
     20 class ShaderExecutable11 : public ShaderExecutable
     21 {
     22   public:
     23     ShaderExecutable11(const void *function, size_t length, ID3D11PixelShader *executable);
     24     ShaderExecutable11(const void *function, size_t length, ID3D11VertexShader *executable, ID3D11GeometryShader *streamOut);
     25     ShaderExecutable11(const void *function, size_t length, ID3D11GeometryShader *executable);
     26 
     27     virtual ~ShaderExecutable11();
     28 
     29     static ShaderExecutable11 *makeShaderExecutable11(ShaderExecutable *executable);
     30 
     31     ID3D11PixelShader *getPixelShader() const;
     32     ID3D11VertexShader *getVertexShader() const;
     33     ID3D11GeometryShader *getGeometryShader() const;
     34     ID3D11GeometryShader *getStreamOutShader() const;
     35 
     36   private:
     37     DISALLOW_COPY_AND_ASSIGN(ShaderExecutable11);
     38 
     39     ID3D11PixelShader *mPixelExecutable;
     40     ID3D11VertexShader *mVertexExecutable;
     41     ID3D11GeometryShader *mGeometryExecutable;
     42     ID3D11GeometryShader *mStreamOutExecutable;
     43 };
     44 
     45 class UniformStorage11 : public UniformStorage
     46 {
     47   public:
     48     UniformStorage11(Renderer11 *renderer, size_t initialSize);
     49     virtual ~UniformStorage11();
     50 
     51     static const UniformStorage11 *makeUniformStorage11(const UniformStorage *uniformStorage);
     52 
     53     ID3D11Buffer *getConstantBuffer() const { return mConstantBuffer; }
     54 
     55   private:
     56     ID3D11Buffer *mConstantBuffer;
     57 };
     58 
     59 }
     60 
     61 #endif // LIBGLESV2_RENDERER_SHADEREXECUTABLE11_H_
     62