diff options
Diffstat (limited to 'src/3rdparty/angle/src/libGLESv2/Buffer.h')
-rw-r--r-- | src/3rdparty/angle/src/libGLESv2/Buffer.h | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/src/3rdparty/angle/src/libGLESv2/Buffer.h b/src/3rdparty/angle/src/libGLESv2/Buffer.h index 4048f4b906..389c3d4b00 100644 --- a/src/3rdparty/angle/src/libGLESv2/Buffer.h +++ b/src/3rdparty/angle/src/libGLESv2/Buffer.h @@ -1,5 +1,5 @@ // -// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved. +// Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -13,14 +13,11 @@ #include "common/angleutils.h" #include "common/RefCountObject.h" -#include "libGLESv2/renderer/IndexRangeCache.h" namespace rx { class Renderer; -class BufferStorage; -class StaticIndexBufferInterface; -class StaticVertexBufferInterface; +class BufferImpl; }; namespace gl @@ -29,38 +26,40 @@ namespace gl class Buffer : public RefCountObject { public: - Buffer(rx::Renderer *renderer, GLuint id); + Buffer(rx::BufferImpl *impl, GLuint id); virtual ~Buffer(); void bufferData(const void *data, GLsizeiptr size, GLenum usage); void bufferSubData(const void *data, GLsizeiptr size, GLintptr offset); + void copyBufferSubData(Buffer* source, GLintptr sourceOffset, GLintptr destOffset, GLsizeiptr size); + GLvoid *mapRange(GLintptr offset, GLsizeiptr length, GLbitfield access); + void unmap(); - GLenum usage() const; + GLenum getUsage() const { return mUsage; } + GLint getAccessFlags() const { return mAccessFlags; } + GLboolean isMapped() const { return mMapped; } + GLvoid *getMapPointer() const { return mMapPointer; } + GLint64 getMapOffset() const { return mMapOffset; } + GLint64 getMapLength() const { return mMapLength; } + GLint64 getSize() const { return mSize; } - rx::BufferStorage *getStorage() const; - unsigned int size() const; + rx::BufferImpl *getImplementation() const { return mBuffer; } - rx::StaticVertexBufferInterface *getStaticVertexBuffer(); - rx::StaticIndexBufferInterface *getStaticIndexBuffer(); - void invalidateStaticData(); - void promoteStaticUsage(int dataSize); - - rx::IndexRangeCache *getIndexRangeCache(); + void markTransformFeedbackUsage(); private: DISALLOW_COPY_AND_ASSIGN(Buffer); - rx::Renderer *mRenderer; - GLenum mUsage; - - rx::BufferStorage *mBufferStorage; + rx::BufferImpl *mBuffer; - rx::IndexRangeCache mIndexRangeCache; - - rx::StaticVertexBufferInterface *mStaticVertexBuffer; - rx::StaticIndexBufferInterface *mStaticIndexBuffer; - unsigned int mUnmodifiedDataUse; + GLenum mUsage; + GLsizeiptr mSize; + GLint mAccessFlags; + GLboolean mMapped; + GLvoid *mMapPointer; + GLint64 mMapOffset; + GLint64 mMapLength; }; } |