#include "libANGLE/VertexArray.h"
#include "common/utilities.h"
#include "libANGLE/Buffer.h"
#include "libANGLE/Context.h"
#include "libANGLE/renderer/BufferImpl.h"
#include "libANGLE/renderer/GLImplFactory.h"
#include "libANGLE/renderer/VertexArrayImpl.h"
namespace gl
{
namespace
{
bool IsElementArrayBufferSubjectIndex(angle::SubjectIndex subjectIndex)
{ … }
}
VertexArrayState::VertexArrayState(VertexArray *vertexArray,
size_t maxAttribs,
size_t maxAttribBindings)
: … { … }
VertexArrayState::~VertexArrayState() { … }
bool VertexArrayState::hasEnabledNullPointerClientArray() const
{ … }
AttributesMask VertexArrayState::getBindingToAttributesMask(GLuint bindingIndex) const
{ … }
void VertexArrayState::setAttribBinding(const Context *context,
size_t attribIndex,
GLuint newBindingIndex)
{ … }
void VertexArrayState::updateCachedMutableOrNonPersistentArrayBuffers(size_t index)
{ … }
bool VertexArrayState::isDefault() const
{ … }
VertexArray::VertexArray(rx::GLImplFactory *factory,
VertexArrayID id,
size_t maxAttribs,
size_t maxAttribBindings)
: … { … }
void VertexArray::onDestroy(const Context *context)
{ … }
VertexArray::~VertexArray()
{ … }
angle::Result VertexArray::setLabel(const Context *context, const std::string &label)
{ … }
const std::string &VertexArray::getLabel() const
{ … }
bool VertexArray::detachBuffer(const Context *context, BufferID bufferID)
{ … }
const VertexAttribute &VertexArray::getVertexAttribute(size_t attribIndex) const
{ … }
const VertexBinding &VertexArray::getVertexBinding(size_t bindingIndex) const
{ … }
size_t VertexArray::GetVertexIndexFromDirtyBit(size_t dirtyBit)
{ … }
ANGLE_INLINE void VertexArray::setDirtyAttribBit(size_t attribIndex,
DirtyAttribBitType dirtyAttribBit)
{ … }
ANGLE_INLINE void VertexArray::clearDirtyAttribBit(size_t attribIndex,
DirtyAttribBitType dirtyAttribBit)
{ … }
ANGLE_INLINE void VertexArray::setDirtyBindingBit(size_t bindingIndex,
DirtyBindingBitType dirtyBindingBit)
{ … }
ANGLE_INLINE void VertexArray::updateCachedBufferBindingSize(VertexBinding *binding)
{ … }
ANGLE_INLINE void VertexArray::updateCachedArrayBuffersMasks(
bool isMapped,
bool isImmutable,
bool isPersistent,
const AttributesMask &boundAttributesMask)
{ … }
ANGLE_INLINE void VertexArray::updateCachedMappedArrayBuffersBinding(const VertexBinding &binding)
{ … }
ANGLE_INLINE void VertexArray::updateCachedTransformFeedbackBindingValidation(size_t bindingIndex,
const Buffer *buffer)
{ … }
VertexArray::DirtyBindingBits VertexArray::bindVertexBufferImpl(const Context *context,
size_t bindingIndex,
Buffer *boundBuffer,
GLintptr offset,
GLsizei stride)
{ … }
void VertexArray::bindVertexBuffer(const Context *context,
size_t bindingIndex,
Buffer *boundBuffer,
GLintptr offset,
GLsizei stride)
{ … }
void VertexArray::setVertexAttribBinding(const Context *context,
size_t attribIndex,
GLuint bindingIndex)
{ … }
void VertexArray::setVertexBindingDivisor(const Context *context,
size_t bindingIndex,
GLuint divisor)
{ … }
ANGLE_INLINE bool VertexArray::setVertexAttribFormatImpl(VertexAttribute *attrib,
GLint size,
VertexAttribType type,
bool normalized,
bool pureInteger,
GLuint relativeOffset)
{ … }
void VertexArray::setVertexAttribFormat(size_t attribIndex,
GLint size,
VertexAttribType type,
bool normalized,
bool pureInteger,
GLuint relativeOffset)
{ … }
void VertexArray::setVertexAttribDivisor(const Context *context, size_t attribIndex, GLuint divisor)
{ … }
void VertexArray::enableAttribute(size_t attribIndex, bool enabledState)
{ … }
ANGLE_INLINE void VertexArray::setVertexAttribPointerImpl(const Context *context,
ComponentType componentType,
bool pureInteger,
size_t attribIndex,
Buffer *boundBuffer,
GLint size,
VertexAttribType type,
bool normalized,
GLsizei stride,
const void *pointer)
{ … }
void VertexArray::setVertexAttribPointer(const Context *context,
size_t attribIndex,
Buffer *boundBuffer,
GLint size,
VertexAttribType type,
bool normalized,
GLsizei stride,
const void *pointer)
{ … }
void VertexArray::setVertexAttribIPointer(const Context *context,
size_t attribIndex,
Buffer *boundBuffer,
GLint size,
VertexAttribType type,
GLsizei stride,
const void *pointer)
{ … }
angle::Result VertexArray::syncState(const Context *context)
{ … }
void VertexArray::onBind(const Context *context)
{ … }
void VertexArray::onUnbind(const Context *context)
{ … }
void VertexArray::onBindingChanged(const Context *context, int incr)
{ … }
VertexArray::DirtyBitType VertexArray::getDirtyBitFromIndex(bool contentsChanged,
angle::SubjectIndex index) const
{ … }
void VertexArray::onSubjectStateChange(angle::SubjectIndex index, angle::SubjectMessage message)
{ … }
void VertexArray::setDependentDirtyBit(bool contentsChanged, angle::SubjectIndex index)
{ … }
bool VertexArray::hasTransformFeedbackBindingConflict(const Context *context) const
{ … }
angle::Result VertexArray::getIndexRangeImpl(const Context *context,
DrawElementsType type,
GLsizei indexCount,
const void *indices,
IndexRange *indexRangeOut) const
{ … }
VertexArray::IndexRangeCache::IndexRangeCache() = default;
void VertexArray::IndexRangeCache::put(DrawElementsType type,
GLsizei indexCount,
size_t offset,
const IndexRange &indexRange)
{ … }
void VertexArray::onBufferContentsChange(uint32_t bufferIndex)
{ … }
VertexArrayBufferContentsObservers::VertexArrayBufferContentsObservers(VertexArray *vertexArray)
: … { … }
void VertexArrayBufferContentsObservers::enableForBuffer(Buffer *buffer, uint32_t attribIndex)
{ … }
void VertexArrayBufferContentsObservers::disableForBuffer(Buffer *buffer, uint32_t attribIndex)
{ … }
}