xref: /aosp_15_r20/external/angle/src/libANGLE/renderer/metal/ShaderMtl.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1 //
2 // Copyright 2019 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 // ShaderMtl.h:
7 //    Defines the class interface for ShaderMtl, implementing ShaderImpl.
8 //
9 #ifndef LIBANGLE_RENDERER_METAL_SHADERMTL_H_
10 #define LIBANGLE_RENDERER_METAL_SHADERMTL_H_
11 
12 #include <map>
13 
14 #include "libANGLE/renderer/ShaderImpl.h"
15 #include "libANGLE/renderer/metal/mtl_msl_utils.h"
16 
17 namespace rx
18 {
19 class ShaderMtl : public ShaderImpl
20 {
21   public:
22     ShaderMtl(const gl::ShaderState &state);
23     ~ShaderMtl() override;
24 
25     std::shared_ptr<ShaderTranslateTask> compile(const gl::Context *context,
26                                                  ShCompileOptions *options) override;
27     std::shared_ptr<ShaderTranslateTask> load(const gl::Context *context,
28                                               gl::BinaryInputStream *stream) override;
29 
getCompiledState()30     const SharedCompiledShaderStateMtl &getCompiledState() const { return mCompiledState; }
31 
32     std::string getDebugInfo() const override;
33 
34   private:
35     SharedCompiledShaderStateMtl mCompiledState;
36 };
37 
38 }  // namespace rx
39 
40 #endif /* LIBANGLE_RENDERER_METAL_SHADERMTL_H_ */
41