#include "libANGLE/renderer/gl/RendererGL.h"
#include <EGL/eglext.h>
#include <thread>
#include "common/debug.h"
#include "common/system_utils.h"
#include "libANGLE/AttributeMap.h"
#include "libANGLE/Context.h"
#include "libANGLE/Display.h"
#include "libANGLE/State.h"
#include "libANGLE/Surface.h"
#include "libANGLE/renderer/gl/BlitGL.h"
#include "libANGLE/renderer/gl/BufferGL.h"
#include "libANGLE/renderer/gl/ClearMultiviewGL.h"
#include "libANGLE/renderer/gl/CompilerGL.h"
#include "libANGLE/renderer/gl/ContextGL.h"
#include "libANGLE/renderer/gl/DisplayGL.h"
#include "libANGLE/renderer/gl/FenceNVGL.h"
#include "libANGLE/renderer/gl/FramebufferGL.h"
#include "libANGLE/renderer/gl/FunctionsGL.h"
#include "libANGLE/renderer/gl/PLSProgramCache.h"
#include "libANGLE/renderer/gl/ProgramGL.h"
#include "libANGLE/renderer/gl/QueryGL.h"
#include "libANGLE/renderer/gl/RenderbufferGL.h"
#include "libANGLE/renderer/gl/SamplerGL.h"
#include "libANGLE/renderer/gl/ShaderGL.h"
#include "libANGLE/renderer/gl/StateManagerGL.h"
#include "libANGLE/renderer/gl/SurfaceGL.h"
#include "libANGLE/renderer/gl/SyncGL.h"
#include "libANGLE/renderer/gl/TextureGL.h"
#include "libANGLE/renderer/gl/TransformFeedbackGL.h"
#include "libANGLE/renderer/gl/VertexArrayGL.h"
#include "libANGLE/renderer/gl/renderergl_utils.h"
#include "libANGLE/renderer/renderer_utils.h"
namespace
{
void SetMaxShaderCompilerThreads(const rx::FunctionsGL *functions, GLuint count)
{ … }
#if defined(ANGLE_PLATFORM_ANDROID)
const char *kIgnoredErrors[] = {
"FreeAllocationOnTimestamp - Reference to buffer created from "
"different context without a share list. Application failed to pass "
"share_context to eglCreateContext. Results are undefined.",
"UpdateTimestamp - Reference to buffer created from different context without a share list. "
"Application failed to pass share_context to eglCreateContext. Results are undefined.",
"Attempt to use resource over contexts without enabling context sharing. App must pass a "
"share_context to eglCreateContext() to share resources.",
};
#endif
const char *kIgnoredWarnings[] = …;
}
static void INTERNAL_GL_APIENTRY LogGLDebugMessage(GLenum source,
GLenum type,
GLuint id,
GLenum severity,
GLsizei length,
const GLchar *message,
const void *userParam)
{ … }
namespace rx
{
RendererGL::RendererGL(std::unique_ptr<FunctionsGL> functions,
const egl::AttributeMap &attribMap,
DisplayGL *display)
: … { … }
RendererGL::~RendererGL()
{ … }
angle::Result RendererGL::flush()
{ … }
angle::Result RendererGL::finish()
{ … }
gl::GraphicsResetStatus RendererGL::getResetStatus()
{ … }
void RendererGL::insertEventMarker(GLsizei length, const char *marker) { … }
void RendererGL::pushGroupMarker(GLsizei length, const char *marker) { … }
void RendererGL::popGroupMarker() { … }
void RendererGL::pushDebugGroup(GLenum source, GLuint id, const std::string &message) { … }
void RendererGL::popDebugGroup() { … }
const gl::Version &RendererGL::getMaxSupportedESVersion() const
{ … }
void RendererGL::generateCaps(gl::Caps *outCaps,
gl::TextureCapsMap *outTextureCaps,
gl::Extensions *outExtensions,
gl::Limitations *outLimitations) const
{ … }
GLint RendererGL::getGPUDisjoint()
{ … }
GLint64 RendererGL::getTimestamp()
{ … }
void RendererGL::ensureCapsInitialized() const
{ … }
const gl::Caps &RendererGL::getNativeCaps() const
{ … }
const gl::TextureCapsMap &RendererGL::getNativeTextureCaps() const
{ … }
const gl::Extensions &RendererGL::getNativeExtensions() const
{ … }
const gl::Limitations &RendererGL::getNativeLimitations() const
{ … }
const ShPixelLocalStorageOptions &RendererGL::getNativePixelLocalStorageOptions() const
{ … }
PLSProgramCache *RendererGL::getPLSProgramCache()
{ … }
MultiviewImplementationTypeGL RendererGL::getMultiviewImplementationType() const
{ … }
void RendererGL::initializeFrontendFeatures(angle::FrontendFeatures *features) const
{ … }
angle::Result RendererGL::dispatchCompute(const gl::Context *context,
GLuint numGroupsX,
GLuint numGroupsY,
GLuint numGroupsZ)
{ … }
angle::Result RendererGL::dispatchComputeIndirect(const gl::Context *context, GLintptr indirect)
{ … }
angle::Result RendererGL::memoryBarrier(GLbitfield barriers)
{ … }
angle::Result RendererGL::memoryBarrierByRegion(GLbitfield barriers)
{ … }
void RendererGL::framebufferFetchBarrier()
{ … }
bool RendererGL::hasNativeParallelCompile()
{ … }
void RendererGL::setMaxShaderCompilerThreads(GLuint count)
{ … }
void RendererGL::setNeedsFlushBeforeDeleteTextures()
{ … }
void RendererGL::markWorkSubmitted()
{ … }
void RendererGL::flushIfNecessaryBeforeDeleteTextures()
{ … }
void RendererGL::handleGPUSwitch()
{ … }
}