summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/libGLESv2/State.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/libGLESv2/State.h')
-rw-r--r--src/3rdparty/angle/src/libGLESv2/State.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/3rdparty/angle/src/libGLESv2/State.h b/src/3rdparty/angle/src/libGLESv2/State.h
index 5f0433136c..c3e6106bd8 100644
--- a/src/3rdparty/angle/src/libGLESv2/State.h
+++ b/src/3rdparty/angle/src/libGLESv2/State.h
@@ -25,6 +25,9 @@ class Query;
class VertexArray;
class Context;
struct Caps;
+struct Data;
+
+typedef std::map< GLenum, BindingPointer<Texture> > TextureMap;
class State
{
@@ -35,8 +38,6 @@ class State
void initialize(const Caps& caps, GLuint clientVersion);
void reset();
- void setContext(Context *context) { mContext = context; }
-
// State chunk getters
const RasterizerState &getRasterizerState() const;
const BlendState &getBlendState() const;
@@ -100,7 +101,7 @@ class State
bool isSampleCoverageEnabled() const;
void setSampleCoverage(bool enabled);
void setSampleCoverageParams(GLclampf value, bool invert);
- void getSampleCoverageParams(GLclampf *value, bool *invert);
+ void getSampleCoverageParams(GLclampf *value, bool *invert) const;
// Scissor test state toggle & query
bool isScissorTestEnabled() const;
@@ -133,7 +134,8 @@ class State
void setSamplerTexture(GLenum type, Texture *texture);
Texture *getSamplerTexture(unsigned int sampler, GLenum type) const;
GLuint getSamplerTextureId(unsigned int sampler, GLenum type) const;
- void detachTexture(GLuint texture);
+ void detachTexture(const TextureMap &zeroTextures, GLuint texture);
+ void initializeZeroTextures(const TextureMap &zeroTextures);
// Sampler object binding manipulation
void setSamplerBinding(GLuint textureUnit, Sampler *sampler);
@@ -199,6 +201,7 @@ class State
GLuint getIndexedTransformFeedbackBufferId(GLuint index) const;
Buffer *getIndexedTransformFeedbackBuffer(GLuint index) const;
GLuint getIndexedTransformFeedbackBufferOffset(GLuint index) const;
+ size_t getTransformFeedbackBufferIndexRange() const;
// GL_COPY_[READ/WRITE]_BUFFER
void setCopyReadBufferBinding(Buffer *buffer);
@@ -220,7 +223,6 @@ class State
bool normalized, bool pureInteger, GLsizei stride, const void *pointer);
const VertexAttribute &getVertexAttribState(unsigned int attribNum) const;
const VertexAttribCurrentValueData &getVertexAttribCurrentValue(unsigned int attribNum) const;
- const VertexAttribCurrentValueData *getVertexAttribCurrentValues() const;
const void *getVertexAttribPointer(unsigned int attribNum) const;
// Pixel pack state manipulation
@@ -238,7 +240,7 @@ class State
// State query functions
void getBooleanv(GLenum pname, GLboolean *params);
void getFloatv(GLenum pname, GLfloat *params);
- void getIntegerv(GLenum pname, GLint *params);
+ void getIntegerv(const gl::Data &data, GLenum pname, GLint *params);
bool getIndexedIntegerv(GLenum target, GLuint index, GLint *data);
bool getIndexedInteger64v(GLenum target, GLuint index, GLint64 *data);
@@ -247,7 +249,9 @@ class State
private:
DISALLOW_COPY_AND_ASSIGN(State);
- Context *mContext;
+ // Cached values from Context's caps
+ GLuint mMaxDrawBuffers;
+ GLuint mMaxCombinedTextureImageUnits;
ColorF mColorClearValue;
GLclampf mDepthClearValue;
@@ -283,7 +287,8 @@ class State
GLuint mCurrentProgramId;
BindingPointer<ProgramBinary> mCurrentProgramBinary;
- VertexAttribCurrentValueData mVertexAttribCurrentValues[MAX_VERTEX_ATTRIBS]; // From glVertexAttrib
+ typedef std::vector<VertexAttribCurrentValueData> VertexAttribVector;
+ VertexAttribVector mVertexAttribCurrentValues; // From glVertexAttrib
VertexArray *mVertexArray;
// Texture and sampler bindings
@@ -300,11 +305,12 @@ class State
ActiveQueryMap mActiveQueries;
BindingPointer<Buffer> mGenericUniformBuffer;
- OffsetBindingPointer<Buffer> mUniformBuffers[IMPLEMENTATION_MAX_COMBINED_SHADER_UNIFORM_BUFFERS];
+ typedef std::vector< OffsetBindingPointer<Buffer> > BufferVector;
+ BufferVector mUniformBuffers;
BindingPointer<TransformFeedback> mTransformFeedback;
BindingPointer<Buffer> mGenericTransformFeedbackBuffer;
- OffsetBindingPointer<Buffer> mTransformFeedbackBuffers[IMPLEMENTATION_MAX_TRANSFORM_FEEDBACK_BUFFERS];
+ BufferVector mTransformFeedbackBuffers;
BindingPointer<Buffer> mCopyReadBuffer;
BindingPointer<Buffer> mCopyWriteBuffer;