xref: /aosp_15_r20/external/angle/src/libANGLE/renderer/gl/ShaderGL.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1 //
2 // Copyright 2015 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 // ShaderGL.h: Defines the class interface for ShaderGL.
8 
9 #ifndef LIBANGLE_RENDERER_GL_SHADERGL_H_
10 #define LIBANGLE_RENDERER_GL_SHADERGL_H_
11 
12 #include "libANGLE/renderer/ShaderImpl.h"
13 
14 namespace rx
15 {
16 class RendererGL;
17 enum class MultiviewImplementationTypeGL;
18 
19 class ShaderGL : public ShaderImpl
20 {
21   public:
22     ShaderGL(const gl::ShaderState &state, GLuint shaderID);
23     ~ShaderGL() override;
24 
25     void onDestroy(const gl::Context *context) override;
26 
27     std::shared_ptr<ShaderTranslateTask> compile(const gl::Context *context,
28                                                  ShCompileOptions *options) override;
29     std::shared_ptr<ShaderTranslateTask> load(const gl::Context *context,
30                                               gl::BinaryInputStream *stream) override;
31 
32     std::string getDebugInfo() const override;
33 
34     GLuint getShaderID() const;
35 
36   private:
37     GLuint mShaderID = 0;
38 };
39 
40 }  // namespace rx
41 
42 #endif  // LIBANGLE_RENDERER_GL_SHADERGL_H_
43