2 // Copyright (c) 2012 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.
7 // ShaderExecutable.h: Defines a renderer-agnostic class to contain shader
8 // executable implementation details.
10 #ifndef LIBGLESV2_RENDERER_SHADEREXECUTABLE_H_
11 #define LIBGLESV2_RENDERER_SHADEREXECUTABLE_H_
13 #include "common/angleutils.h"
14 #include "common/debug.h"
22 class ShaderExecutable
25 ShaderExecutable(const void *function, size_t length)
26 : mFunctionBuffer(length)
28 memcpy(mFunctionBuffer.data(), function, length);
31 virtual ~ShaderExecutable() {}
33 const uint8_t *getFunction() const
35 return mFunctionBuffer.data();
38 size_t getLength() const
40 return mFunctionBuffer.size();
43 const std::string &getDebugInfo() const
48 void appendDebugInfo(const std::string &info)
54 DISALLOW_COPY_AND_ASSIGN(ShaderExecutable);
56 std::vector<uint8_t> mFunctionBuffer;
57 std::string mDebugInfo;
63 UniformStorage(size_t initialSize)
68 virtual ~UniformStorage() {}
70 size_t size() const { return mSize; }
78 #endif // LIBGLESV2_RENDERER_SHADEREXECUTABLE_H_