summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/libGLESv2/renderer/ShaderExecutable.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/libGLESv2/renderer/ShaderExecutable.h')
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/ShaderExecutable.h39
1 files changed, 26 insertions, 13 deletions
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/ShaderExecutable.h b/src/3rdparty/angle/src/libGLESv2/renderer/ShaderExecutable.h
index 293e340845..054d00a712 100644
--- a/src/3rdparty/angle/src/libGLESv2/renderer/ShaderExecutable.h
+++ b/src/3rdparty/angle/src/libGLESv2/renderer/ShaderExecutable.h
@@ -11,6 +11,7 @@
#define LIBGLESV2_RENDERER_SHADEREXECUTABLE_H_
#include "common/angleutils.h"
+#include "common/debug.h"
namespace rx
{
@@ -18,32 +19,44 @@ namespace rx
class ShaderExecutable
{
public:
- ShaderExecutable(const void *function, size_t length) : mLength(length)
+ ShaderExecutable(const void *function, size_t length)
+ : mFunctionBuffer(length)
{
- mFunction = new char[length];
- memcpy(mFunction, function, length);
- }
-
- virtual ~ShaderExecutable()
- {
- delete[] mFunction;
+ memcpy(mFunctionBuffer.data(), function, length);
}
- void *getFunction() const
+ virtual ~ShaderExecutable() {}
+
+ const uint8_t *getFunction() const
{
- return mFunction;
+ return mFunctionBuffer.data();
}
size_t getLength() const
{
- return mLength;
+ return mFunctionBuffer.size();
}
private:
DISALLOW_COPY_AND_ASSIGN(ShaderExecutable);
- void *mFunction;
- const size_t mLength;
+ std::vector<uint8_t> mFunctionBuffer;
+};
+
+class UniformStorage
+{
+ public:
+ UniformStorage(size_t initialSize)
+ : mSize(initialSize)
+ {
+ }
+
+ virtual ~UniformStorage() {}
+
+ size_t size() const { return mSize; }
+
+ private:
+ size_t mSize;
};
}