#include "libANGLE/PixelLocalStorage.h"
#include <numeric>
#include "common/FixedVector.h"
#include "libANGLE/Context.h"
#include "libANGLE/Framebuffer.h"
#include "libANGLE/context_private_call_gles_autogen.h"
#include "libANGLE/renderer/ContextImpl.h"
#include "libANGLE/renderer/TextureImpl.h"
namespace gl
{
namespace
{
class ScopedBindTexture2D : angle::NonCopyable
{ … };
class ScopedRestoreDrawFramebuffer : angle::NonCopyable
{ … };
class ScopedDisableScissor : angle::NonCopyable
{ … };
class ScopedEnableColorMask : angle::NonCopyable
{ … };
}
PixelLocalStoragePlane::PixelLocalStoragePlane() : … { … }
PixelLocalStoragePlane::~PixelLocalStoragePlane()
{ … }
void PixelLocalStoragePlane::onContextObjectsLost()
{ … }
void PixelLocalStoragePlane::deinitialize(Context *context)
{ … }
void PixelLocalStoragePlane::setMemoryless(Context *context, GLenum internalformat)
{ … }
void PixelLocalStoragePlane::setTextureBacked(Context *context, Texture *tex, int level, int layer)
{ … }
void PixelLocalStoragePlane::onSubjectStateChange(angle::SubjectIndex index,
angle::SubjectMessage message)
{ … }
bool PixelLocalStoragePlane::isDeinitialized() const
{ … }
GLint PixelLocalStoragePlane::getIntegeri(GLenum target) const
{ … }
bool PixelLocalStoragePlane::getTextureImageExtents(const Context *context, Extents *extents) const
{ … }
void PixelLocalStoragePlane::ensureBackingTextureIfMemoryless(Context *context, Extents plsExtents)
{ … }
void PixelLocalStoragePlane::attachToDrawFramebuffer(Context *context, GLenum colorAttachment) const
{ … }
class ClearBufferCommands : public PixelLocalStoragePlane::ClearCommands
{ … };
template <typename T, size_t N>
void ClampArray(std::array<T, N> &arr, T lo, T hi)
{ … }
void PixelLocalStoragePlane::issueClearCommand(ClearCommands *clearCommands,
int target,
GLenum loadop) const
{ … }
void PixelLocalStoragePlane::bindToImage(Context *context, GLuint unit, bool needsR32Packing) const
{ … }
const Texture *PixelLocalStoragePlane::getBackingTexture(const Context *context) const
{ … }
PixelLocalStorage::PixelLocalStorage(const ShPixelLocalStorageOptions &plsOptions, const Caps &caps)
: … { … }
PixelLocalStorage::~PixelLocalStorage() { … }
namespace
{
bool AllPlanesDeinitialized(
const angle::FixedVector<PixelLocalStoragePlane, IMPLEMENTATION_MAX_PIXEL_LOCAL_STORAGE_PLANES>
&planes,
const Context *context)
{ … }
}
void PixelLocalStorage::onFramebufferDestroyed(const Context *context)
{ … }
void PixelLocalStorage::deleteContextObjects(Context *context)
{ … }
void PixelLocalStorage::begin(Context *context, GLsizei n, const GLenum loadops[])
{ … }
void PixelLocalStorage::end(Context *context, const GLenum storeops[])
{ … }
void PixelLocalStorage::barrier(Context *context)
{ … }
void PixelLocalStorage::interrupt(Context *context)
{ … }
void PixelLocalStorage::restore(Context *context)
{ … }
namespace
{
class PixelLocalStorageImageLoadStore : public PixelLocalStorage
{ … };
class PixelLocalStorageFramebufferFetch : public PixelLocalStorage
{ … };
class PixelLocalStorageEXT : public PixelLocalStorage
{ … };
}
std::unique_ptr<PixelLocalStorage> PixelLocalStorage::Make(const Context *context)
{ … }
}