diff options
Diffstat (limited to 'src/3rdparty/angle/src/libANGLE/State.h')
-rw-r--r-- | src/3rdparty/angle/src/libANGLE/State.h | 348 |
1 files changed, 247 insertions, 101 deletions
diff --git a/src/3rdparty/angle/src/libANGLE/State.h b/src/3rdparty/angle/src/libANGLE/State.h index e822d7e679..52e1d78382 100644 --- a/src/3rdparty/angle/src/libANGLE/State.h +++ b/src/3rdparty/angle/src/libANGLE/State.h @@ -12,14 +12,18 @@ #include <bitset> #include <memory> +#include "common/Color.h" #include "common/angleutils.h" +#include "common/bitset_utils.h" #include "libANGLE/Debug.h" #include "libANGLE/Program.h" +#include "libANGLE/ProgramPipeline.h" #include "libANGLE/RefCountObject.h" #include "libANGLE/Renderbuffer.h" #include "libANGLE/Sampler.h" #include "libANGLE/Texture.h" #include "libANGLE/TransformFeedback.h" +#include "libANGLE/Version.h" #include "libANGLE/VertexAttribute.h" #include "libANGLE/angletypes.h" @@ -29,21 +33,20 @@ class Query; class VertexArray; class Context; struct Caps; -struct Data; -typedef std::map<GLenum, BindingPointer<Texture>> TextureMap; - -class State : angle::NonCopyable +class State : public OnAttachmentDirtyReceiver, angle::NonCopyable { public: State(); - ~State(); + ~State() override; - void initialize(const Caps &caps, - const Extensions &extensions, - GLuint clientVersion, - bool debug); - void reset(); + void initialize(const Context *context, + bool debug, + bool bindGeneratesResource, + bool clientArraysEnabled, + bool robustResourceInit, + bool programBinaryCacheEnabled); + void reset(const Context *context); // State chunk getters const RasterizerState &getRasterizerState() const; @@ -74,7 +77,7 @@ class State : angle::NonCopyable // Face culling state manipulation bool isCullFaceEnabled() const; void setCullFace(bool enabled); - void setCullMode(GLenum mode); + void setCullMode(CullFaceMode mode); void setFrontFace(GLenum front); // Depth test state manipulation @@ -100,8 +103,12 @@ class State : angle::NonCopyable void setStencilBackParams(GLenum stencilBackFunc, GLint stencilBackRef, GLuint stencilBackMask); void setStencilWritemask(GLuint stencilWritemask); void setStencilBackWritemask(GLuint stencilBackWritemask); - void setStencilOperations(GLenum stencilFail, GLenum stencilPassDepthFail, GLenum stencilPassDepthPass); - void setStencilBackOperations(GLenum stencilBackFail, GLenum stencilBackPassDepthFail, GLenum stencilBackPassDepthPass); + void setStencilOperations(GLenum stencilFail, + GLenum stencilPassDepthFail, + GLenum stencilPassDepthPass); + void setStencilBackOperations(GLenum stencilBackFail, + GLenum stencilBackPassDepthFail, + GLenum stencilBackPassDepthPass); GLint getStencilRef() const; GLint getStencilBackRef() const; @@ -116,9 +123,22 @@ class State : angle::NonCopyable bool isSampleCoverageEnabled() const; void setSampleCoverage(bool enabled); void setSampleCoverageParams(GLclampf value, bool invert); - GLclampf getSampleCoverageValue() const; + GLfloat getSampleCoverageValue() const; bool getSampleCoverageInvert() const; + // Multisample mask state manipulation. + bool isSampleMaskEnabled() const; + void setSampleMaskEnabled(bool enabled); + void setSampleMaskParams(GLuint maskNumber, GLbitfield mask); + GLbitfield getSampleMaskWord(GLuint maskNumber) const; + GLuint getMaxSampleMaskWords() const; + + // Multisampling/alpha to one manipulation. + void setSampleAlphaToOne(bool enabled); + bool isSampleAlphaToOneEnabled() const; + void setMultisampling(bool enabled); + bool isMultisamplingEnabled() const; + // Scissor test state toggle & query bool isScissorTestEnabled() const; void setScissorTest(bool enabled); @@ -131,7 +151,7 @@ class State : angle::NonCopyable // Generic state toggle & query void setEnableFeature(GLenum feature, bool enabled); - bool getEnableFeature(GLenum feature); + bool getEnableFeature(GLenum feature) const; // Line width state setter void setLineWidth(GLfloat width); @@ -141,6 +161,12 @@ class State : angle::NonCopyable void setGenerateMipmapHint(GLenum hint); void setFragmentShaderDerivativeHint(GLenum hint); + // GL_CHROMIUM_bind_generates_resource + bool isBindGeneratesResourceEnabled() const; + + // GL_ANGLE_client_arrays + bool areClientArraysEnabled() const; + // Viewport state setter/getter void setViewportParams(GLint x, GLint y, GLsizei width, GLsizei height); const Rectangle &getViewport() const; @@ -148,33 +174,31 @@ class State : angle::NonCopyable // Texture binding & active texture unit manipulation void setActiveSampler(unsigned int active); unsigned int getActiveSampler() const; - void setSamplerTexture(GLenum type, Texture *texture); + void setSamplerTexture(const Context *context, GLenum type, Texture *texture); Texture *getTargetTexture(GLenum target) const; Texture *getSamplerTexture(unsigned int sampler, GLenum type) const; GLuint getSamplerTextureId(unsigned int sampler, GLenum type) const; - void detachTexture(const TextureMap &zeroTextures, GLuint texture); - void initializeZeroTextures(const TextureMap &zeroTextures); + void detachTexture(const Context *context, const TextureMap &zeroTextures, GLuint texture); + void initializeZeroTextures(const Context *context, const TextureMap &zeroTextures); // Sampler object binding manipulation - void setSamplerBinding(GLuint textureUnit, Sampler *sampler); + void setSamplerBinding(const Context *context, GLuint textureUnit, Sampler *sampler); GLuint getSamplerId(GLuint textureUnit) const; Sampler *getSampler(GLuint textureUnit) const; - void detachSampler(GLuint sampler); + void detachSampler(const Context *context, GLuint sampler); // Renderbuffer binding manipulation - void setRenderbufferBinding(Renderbuffer *renderbuffer); + void setRenderbufferBinding(const Context *context, Renderbuffer *renderbuffer); GLuint getRenderbufferId() const; - Renderbuffer *getCurrentRenderbuffer(); - void detachRenderbuffer(GLuint renderbuffer); + Renderbuffer *getCurrentRenderbuffer() const; + void detachRenderbuffer(const Context *context, GLuint renderbuffer); // Framebuffer binding manipulation void setReadFramebufferBinding(Framebuffer *framebuffer); void setDrawFramebufferBinding(Framebuffer *framebuffer); Framebuffer *getTargetFramebuffer(GLenum target) const; - Framebuffer *getReadFramebuffer(); - Framebuffer *getDrawFramebuffer(); - const Framebuffer *getReadFramebuffer() const; - const Framebuffer *getDrawFramebuffer() const; + Framebuffer *getReadFramebuffer() const; + Framebuffer *getDrawFramebuffer() const; bool removeReadFramebufferBinding(GLuint framebuffer); bool removeDrawFramebufferBinding(GLuint framebuffer); @@ -185,55 +209,75 @@ class State : angle::NonCopyable bool removeVertexArrayBinding(GLuint vertexArray); // Program binding manipulation - void setProgram(Program *newProgram); + void setProgram(const Context *context, Program *newProgram); Program *getProgram() const; // Transform feedback object (not buffer) binding manipulation - void setTransformFeedbackBinding(TransformFeedback *transformFeedback); + void setTransformFeedbackBinding(const Context *context, TransformFeedback *transformFeedback); TransformFeedback *getCurrentTransformFeedback() const; bool isTransformFeedbackActiveUnpaused() const; - void detachTransformFeedback(GLuint transformFeedback); + bool removeTransformFeedbackBinding(const Context *context, GLuint transformFeedback); // Query binding manipulation - bool isQueryActive() const; + bool isQueryActive(const GLenum type) const; bool isQueryActive(Query *query) const; - void setActiveQuery(GLenum target, Query *query); + void setActiveQuery(const Context *context, GLenum target, Query *query); GLuint getActiveQueryId(GLenum target) const; Query *getActiveQuery(GLenum target) const; + // Program Pipeline binding manipulation + void setProgramPipelineBinding(const Context *context, ProgramPipeline *pipeline); + void detachProgramPipeline(const Context *context, GLuint pipeline); + //// Typed buffer binding point manipulation //// - // GL_ARRAY_BUFFER - void setArrayBufferBinding(Buffer *buffer); - GLuint getArrayBufferId() const; + void setBufferBinding(const Context *context, BufferBinding target, Buffer *buffer); + Buffer *getTargetBuffer(BufferBinding target) const; + void setIndexedBufferBinding(const Context *context, + BufferBinding target, + GLuint index, + Buffer *buffer, + GLintptr offset, + GLsizeiptr size); - // GL_UNIFORM_BUFFER - Both indexed and generic targets - void setGenericUniformBufferBinding(Buffer *buffer); - void setIndexedUniformBufferBinding(GLuint index, Buffer *buffer, GLintptr offset, GLsizeiptr size); const OffsetBindingPointer<Buffer> &getIndexedUniformBuffer(size_t index) const; + const OffsetBindingPointer<Buffer> &getIndexedAtomicCounterBuffer(size_t index) const; + const OffsetBindingPointer<Buffer> &getIndexedShaderStorageBuffer(size_t index) const; - // GL_COPY_[READ/WRITE]_BUFFER - void setCopyReadBufferBinding(Buffer *buffer); - void setCopyWriteBufferBinding(Buffer *buffer); - - // GL_PIXEL[PACK/UNPACK]_BUFFER - void setPixelPackBufferBinding(Buffer *buffer); - void setPixelUnpackBufferBinding(Buffer *buffer); - - // Retrieve typed buffer by target (non-indexed) - Buffer *getTargetBuffer(GLenum target) const; // Detach a buffer from all bindings - void detachBuffer(GLuint bufferName); + void detachBuffer(const Context *context, GLuint bufferName); // Vertex attrib manipulation void setEnableVertexAttribArray(unsigned int attribNum, bool enabled); + void setElementArrayBuffer(const Context *context, Buffer *buffer); void setVertexAttribf(GLuint index, const GLfloat values[4]); void setVertexAttribu(GLuint index, const GLuint values[4]); void setVertexAttribi(GLuint index, const GLint values[4]); - void setVertexAttribState(unsigned int attribNum, Buffer *boundBuffer, GLint size, GLenum type, - bool normalized, bool pureInteger, GLsizei stride, const void *pointer); - void setVertexAttribDivisor(GLuint index, GLuint divisor); - const VertexAttribCurrentValueData &getVertexAttribCurrentValue(unsigned int attribNum) const; + void setVertexAttribPointer(const Context *context, + unsigned int attribNum, + Buffer *boundBuffer, + GLint size, + GLenum type, + bool normalized, + bool pureInteger, + GLsizei stride, + const void *pointer); + void setVertexAttribDivisor(const Context *context, GLuint index, GLuint divisor); + const VertexAttribCurrentValueData &getVertexAttribCurrentValue(size_t attribNum) const; + const std::vector<VertexAttribCurrentValueData> &getVertexAttribCurrentValues() const; const void *getVertexAttribPointer(unsigned int attribNum) const; + void bindVertexBuffer(const Context *context, + GLuint bindingIndex, + Buffer *boundBuffer, + GLintptr offset, + GLsizei stride); + void setVertexAttribFormat(GLuint attribIndex, + GLint size, + GLenum type, + bool normalized, + bool pureInteger, + GLuint relativeOffset); + void setVertexAttribBinding(const Context *context, GLuint attribIndex, GLuint bindingIndex); + void setVertexBindingDivisor(GLuint bindingIndex, GLuint divisor); // Pixel pack state manipulation void setPackAlignment(GLint alignment); @@ -269,15 +313,37 @@ class State : angle::NonCopyable const Debug &getDebug() const; Debug &getDebug(); + // CHROMIUM_framebuffer_mixed_samples coverage modulation + void setCoverageModulation(GLenum components); + GLenum getCoverageModulation() const; + + // CHROMIUM_path_rendering + void loadPathRenderingMatrix(GLenum matrixMode, const GLfloat *matrix); + const GLfloat *getPathRenderingMatrix(GLenum which) const; + void setPathStencilFunc(GLenum func, GLint ref, GLuint mask); + + GLenum getPathStencilFunc() const; + GLint getPathStencilRef() const; + GLuint getPathStencilMask() const; + + // GL_EXT_sRGB_write_control + void setFramebufferSRGB(bool sRGB); + bool getFramebufferSRGB() const; + // State query functions void getBooleanv(GLenum pname, GLboolean *params); void getFloatv(GLenum pname, GLfloat *params); - void getIntegerv(const gl::Data &data, GLenum pname, GLint *params); + void getIntegerv(const Context *context, GLenum pname, GLint *params); void getPointerv(GLenum pname, void **params) const; - bool getIndexedIntegerv(GLenum target, GLuint index, GLint *data); - bool getIndexedInteger64v(GLenum target, GLuint index, GLint64 *data); + void getIntegeri_v(GLenum target, GLuint index, GLint *data); + void getInteger64i_v(GLenum target, GLuint index, GLint64 *data); + void getBooleani_v(GLenum target, GLuint index, GLboolean *data); - bool hasMappedBuffer(GLenum target) const; + bool hasMappedBuffer(BufferBinding target) const; + bool isRobustResourceInitEnabled() const { return mRobustResourceInit; } + + // Sets the dirty bit for the program executable. + void onProgramExecutableChange(Program *program); enum DirtyBitType { @@ -293,6 +359,8 @@ class State : angle::NonCopyable DIRTY_BIT_SAMPLE_ALPHA_TO_COVERAGE_ENABLED, DIRTY_BIT_SAMPLE_COVERAGE_ENABLED, DIRTY_BIT_SAMPLE_COVERAGE, + DIRTY_BIT_SAMPLE_MASK_ENABLED, + DIRTY_BIT_SAMPLE_MASK, DIRTY_BIT_DEPTH_TEST_ENABLED, DIRTY_BIT_DEPTH_FUNC, DIRTY_BIT_DEPTH_MASK, @@ -314,17 +382,10 @@ class State : angle::NonCopyable DIRTY_BIT_CLEAR_COLOR, DIRTY_BIT_CLEAR_DEPTH, DIRTY_BIT_CLEAR_STENCIL, - DIRTY_BIT_UNPACK_ALIGNMENT, - DIRTY_BIT_UNPACK_ROW_LENGTH, - DIRTY_BIT_UNPACK_IMAGE_HEIGHT, - DIRTY_BIT_UNPACK_SKIP_IMAGES, - DIRTY_BIT_UNPACK_SKIP_ROWS, - DIRTY_BIT_UNPACK_SKIP_PIXELS, - DIRTY_BIT_PACK_ALIGNMENT, - DIRTY_BIT_PACK_REVERSE_ROW_ORDER, - DIRTY_BIT_PACK_ROW_LENGTH, - DIRTY_BIT_PACK_SKIP_ROWS, - DIRTY_BIT_PACK_SKIP_PIXELS, + DIRTY_BIT_UNPACK_STATE, + DIRTY_BIT_UNPACK_BUFFER_BINDING, + DIRTY_BIT_PACK_STATE, + DIRTY_BIT_PACK_BUFFER_BINDING, DIRTY_BIT_DITHER_ENABLED, DIRTY_BIT_GENERATE_MIPMAP_HINT, DIRTY_BIT_SHADER_DERIVATIVE_HINT, @@ -332,51 +393,83 @@ class State : angle::NonCopyable DIRTY_BIT_DRAW_FRAMEBUFFER_BINDING, DIRTY_BIT_RENDERBUFFER_BINDING, DIRTY_BIT_VERTEX_ARRAY_BINDING, + DIRTY_BIT_DRAW_INDIRECT_BUFFER_BINDING, DIRTY_BIT_PROGRAM_BINDING, - DIRTY_BIT_CURRENT_VALUE_0, - DIRTY_BIT_CURRENT_VALUE_MAX = DIRTY_BIT_CURRENT_VALUE_0 + MAX_VERTEX_ATTRIBS, - DIRTY_BIT_INVALID = DIRTY_BIT_CURRENT_VALUE_MAX, - DIRTY_BIT_MAX = DIRTY_BIT_INVALID, + DIRTY_BIT_PROGRAM_EXECUTABLE, + // TODO(jmadill): Fine-grained dirty bits for each texture/sampler. + DIRTY_BIT_TEXTURE_BINDINGS, + DIRTY_BIT_SAMPLER_BINDINGS, + DIRTY_BIT_MULTISAMPLING, + DIRTY_BIT_SAMPLE_ALPHA_TO_ONE, + DIRTY_BIT_COVERAGE_MODULATION, // CHROMIUM_framebuffer_mixed_samples + DIRTY_BIT_PATH_RENDERING_MATRIX_MV, // CHROMIUM_path_rendering path model view matrix + DIRTY_BIT_PATH_RENDERING_MATRIX_PROJ, // CHROMIUM_path_rendering path projection matrix + DIRTY_BIT_PATH_RENDERING_STENCIL_STATE, + DIRTY_BIT_FRAMEBUFFER_SRGB, // GL_EXT_sRGB_write_control + DIRTY_BIT_CURRENT_VALUES, + DIRTY_BIT_INVALID, + DIRTY_BIT_MAX = DIRTY_BIT_INVALID, }; + static_assert(DIRTY_BIT_MAX <= 64, "State dirty bits must be capped at 64"); + // TODO(jmadill): Consider storing dirty objects in a list instead of by binding. enum DirtyObjectType { DIRTY_OBJECT_READ_FRAMEBUFFER, DIRTY_OBJECT_DRAW_FRAMEBUFFER, DIRTY_OBJECT_VERTEX_ARRAY, - DIRTY_OBJECT_PROGRAM, + // Use a very coarse bit for any program or texture change. + // TODO(jmadill): Fine-grained dirty bits for each texture/sampler. + DIRTY_OBJECT_PROGRAM_TEXTURES, DIRTY_OBJECT_UNKNOWN, DIRTY_OBJECT_MAX = DIRTY_OBJECT_UNKNOWN, }; - typedef std::bitset<DIRTY_BIT_MAX> DirtyBits; + typedef angle::BitSet<DIRTY_BIT_MAX> DirtyBits; const DirtyBits &getDirtyBits() const { return mDirtyBits; } void clearDirtyBits() { mDirtyBits.reset(); } void clearDirtyBits(const DirtyBits &bitset) { mDirtyBits &= ~bitset; } void setAllDirtyBits() { mDirtyBits.set(); } - typedef std::bitset<DIRTY_OBJECT_MAX> DirtyObjects; + typedef angle::BitSet<DIRTY_OBJECT_MAX> DirtyObjects; void clearDirtyObjects() { mDirtyObjects.reset(); } void setAllDirtyObjects() { mDirtyObjects.set(); } - void syncDirtyObjects(); - void syncDirtyObjects(const DirtyObjects &bitset); - void syncDirtyObject(GLenum target); + void syncDirtyObjects(const Context *context); + void syncDirtyObjects(const Context *context, const DirtyObjects &bitset); + void syncDirtyObject(const Context *context, GLenum target); void setObjectDirty(GLenum target); - // Dirty bit masks - const DirtyBits &unpackStateBitMask() const { return mUnpackStateBitMask; } - const DirtyBits &packStateBitMask() const { return mPackStateBitMask; } - const DirtyBits &clearStateBitMask() const { return mClearStateBitMask; } - const DirtyBits &blitStateBitMask() const { return mBlitStateBitMask; } + // This actually clears the current value dirty bits. + // TODO(jmadill): Pass mutable dirty bits into Impl. + AttributesMask getAndResetDirtyCurrentValues() const; + + void setImageUnit(const Context *context, + GLuint unit, + Texture *texture, + GLint level, + GLboolean layered, + GLint layer, + GLenum access, + GLenum format); + + const ImageUnit &getImageUnit(GLuint unit) const; + const std::vector<Texture *> &getCompleteTextureCache() const { return mCompleteTextureCache; } + + // Handle a dirty texture event. + void signal(size_t textureIndex, InitState initState) override; + + Error clearUnclearedActiveTextures(const Context *context); private: + void syncProgramTextures(const Context *context); + // Cached values from Context's caps GLuint mMaxDrawBuffers; GLuint mMaxCombinedTextureImageUnits; ColorF mColorClearValue; - GLclampf mDepthClearValue; + GLfloat mDepthClearValue; int mStencilClearValue; RasterizerState mRasterizer; @@ -386,8 +479,11 @@ class State : angle::NonCopyable BlendState mBlend; ColorF mBlendColor; bool mSampleCoverage; - GLclampf mSampleCoverageValue; + GLfloat mSampleCoverageValue; bool mSampleCoverageInvert; + bool mSampleMask; + GLuint mMaxSampleMaskWords; + std::array<GLbitfield, MAX_SAMPLE_MASK_WORDS> mSampleMaskValues; DepthStencilState mDepthStencil; GLint mStencilRef; @@ -398,59 +494,109 @@ class State : angle::NonCopyable GLenum mGenerateMipmapHint; GLenum mFragmentShaderDerivativeHint; + bool mBindGeneratesResource; + bool mClientArraysEnabled; + Rectangle mViewport; float mNearZ; float mFarZ; - BindingPointer<Buffer> mArrayBuffer; Framebuffer *mReadFramebuffer; Framebuffer *mDrawFramebuffer; BindingPointer<Renderbuffer> mRenderbuffer; Program *mProgram; + BindingPointer<ProgramPipeline> mProgramPipeline; typedef std::vector<VertexAttribCurrentValueData> VertexAttribVector; - VertexAttribVector mVertexAttribCurrentValues; // From glVertexAttrib + VertexAttribVector mVertexAttribCurrentValues; // From glVertexAttrib VertexArray *mVertexArray; // Texture and sampler bindings - size_t mActiveSampler; // Active texture unit selector - GL_TEXTURE0 + size_t mActiveSampler; // Active texture unit selector - GL_TEXTURE0 typedef std::vector<BindingPointer<Texture>> TextureBindingVector; typedef std::map<GLenum, TextureBindingVector> TextureBindingMap; TextureBindingMap mSamplerTextures; + // Texture Completeness Caching + // ---------------------------- + // The texture completeness cache uses dirty bits to avoid having to scan the list + // of textures each draw call. This gl::State class implements OnAttachmentDirtyReceiver, + // and keeps an array of bindings to the Texture class. When the Textures are marked dirty, + // they send messages to the State class (and any Framebuffers they're attached to) via the + // State::signal method (see above). Internally this then invalidates the completeness cache. + // + // Note this requires that we also invalidate the completeness cache manually on events like + // re-binding textures/samplers or a change in the program. For more information see the + // signal_utils.h header and the design doc linked there. + + // A cache of complete textures. nullptr indicates unbound or incomplete. + // Don't use BindingPointer because this cache is only valid within a draw call. + // Also stores a notification channel to the texture itself to handle texture change events. + std::vector<Texture *> mCompleteTextureCache; + std::vector<OnAttachmentDirtyBinding> mCompleteTextureBindings; + InitState mCachedTexturesInitState; + using ActiveTextureMask = angle::BitSet<IMPLEMENTATION_MAX_ACTIVE_TEXTURES>; + ActiveTextureMask mActiveTexturesMask; + typedef std::vector<BindingPointer<Sampler>> SamplerBindingVector; SamplerBindingVector mSamplers; + typedef std::vector<ImageUnit> ImageUnitVector; + ImageUnitVector mImageUnits; + typedef std::map<GLenum, BindingPointer<Query>> ActiveQueryMap; ActiveQueryMap mActiveQueries; - BindingPointer<Buffer> mGenericUniformBuffer; - typedef std::vector<OffsetBindingPointer<Buffer>> BufferVector; + // Stores the currently bound buffer for each binding point. It has entries for the element + // array buffer and the transform feedback buffer but these should not be used. Instead these + // bind points are respectively owned by current the vertex array object and the current + // transform feedback object. + using BoundBufferMap = angle::PackedEnumMap<BufferBinding, BindingPointer<Buffer>>; + BoundBufferMap mBoundBuffers; + + using BufferVector = std::vector<OffsetBindingPointer<Buffer>>; BufferVector mUniformBuffers; + BufferVector mAtomicCounterBuffers; + BufferVector mShaderStorageBuffers; BindingPointer<TransformFeedback> mTransformFeedback; - BindingPointer<Buffer> mCopyReadBuffer; - BindingPointer<Buffer> mCopyWriteBuffer; - + BindingPointer<Buffer> mPixelUnpackBuffer; PixelUnpackState mUnpack; + BindingPointer<Buffer> mPixelPackBuffer; PixelPackState mPack; bool mPrimitiveRestart; Debug mDebug; - DirtyBits mDirtyBits; - DirtyBits mUnpackStateBitMask; - DirtyBits mPackStateBitMask; - DirtyBits mClearStateBitMask; - DirtyBits mBlitStateBitMask; + bool mMultiSampling; + bool mSampleAlphaToOne; + + GLenum mCoverageModulation; + + // CHROMIUM_path_rendering + GLfloat mPathMatrixMV[16]; + GLfloat mPathMatrixProj[16]; + GLenum mPathStencilFunc; + GLint mPathStencilRef; + GLuint mPathStencilMask; + + // GL_EXT_sRGB_write_control + bool mFramebufferSRGB; + // GL_ANGLE_robust_resource_intialization + bool mRobustResourceInit; + + // GL_ANGLE_program_cache_control + bool mProgramBinaryCacheEnabled; + + DirtyBits mDirtyBits; DirtyObjects mDirtyObjects; + mutable AttributesMask mDirtyCurrentValues; }; -} - -#endif // LIBANGLE_STATE_H_ +} // namespace gl +#endif // LIBANGLE_STATE_H_ |