#include "libANGLE/renderer/gl/ProgramGL.h"
#include "common/WorkerThread.h"
#include "common/angleutils.h"
#include "common/bitset_utils.h"
#include "common/debug.h"
#include "common/string_utils.h"
#include "common/utilities.h"
#include "libANGLE/Context.h"
#include "libANGLE/ProgramLinkedResources.h"
#include "libANGLE/Uniform.h"
#include "libANGLE/queryconversions.h"
#include "libANGLE/renderer/gl/ContextGL.h"
#include "libANGLE/renderer/gl/FunctionsGL.h"
#include "libANGLE/renderer/gl/RendererGL.h"
#include "libANGLE/renderer/gl/ShaderGL.h"
#include "libANGLE/renderer/gl/StateManagerGL.h"
#include "libANGLE/trace.h"
#include "platform/PlatformMethods.h"
#include "platform/autogen/FeaturesGL_autogen.h"
namespace rx
{
namespace
{
std::string GetTransformFeedbackVaryingMappedName(const gl::SharedCompiledShaderState &shaderState,
const std::string &tfVaryingName)
{ … }
}
class ProgramGL::LinkTaskGL final : public LinkTask
{ … };
ProgramGL::ProgramGL(const gl::ProgramState &data,
const FunctionsGL *functions,
const angle::FeaturesGL &features,
StateManagerGL *stateManager,
const std::shared_ptr<RendererGL> &renderer)
: … { … }
ProgramGL::~ProgramGL() = default;
void ProgramGL::destroy(const gl::Context *context)
{ … }
angle::Result ProgramGL::load(const gl::Context *context,
gl::BinaryInputStream *stream,
std::shared_ptr<LinkTask> *loadTaskOut,
egl::CacheGetResult *resultOut)
{ … }
void ProgramGL::save(const gl::Context *context, gl::BinaryOutputStream *stream)
{ … }
void ProgramGL::setBinaryRetrievableHint(bool retrievable)
{ … }
void ProgramGL::setSeparable(bool separable)
{ … }
void ProgramGL::prepareForLink(const gl::ShaderMap<ShaderImpl *> &shaders)
{ … }
angle::Result ProgramGL::link(const gl::Context *context, std::shared_ptr<LinkTask> *linkTaskOut)
{ … }
angle::Result ProgramGL::linkJobImpl(const gl::Extensions &extensions)
{ … }
angle::Result ProgramGL::postLinkJobImpl(const gl::ProgramLinkedResources &resources)
{ … }
GLboolean ProgramGL::validate(const gl::Caps & )
{ … }
bool ProgramGL::getUniformBlockSize(const std::string & ,
const std::string &blockMappedName,
size_t *sizeOut) const
{ … }
bool ProgramGL::getUniformBlockMemberInfo(const std::string & ,
const std::string &memberUniformMappedName,
sh::BlockMemberInfo *memberInfoOut) const
{ … }
bool ProgramGL::getShaderStorageBlockMemberInfo(const std::string & ,
const std::string &memberUniformMappedName,
sh::BlockMemberInfo *memberInfoOut) const
{ … }
bool ProgramGL::getShaderStorageBlockSize(const std::string &name,
const std::string &mappedName,
size_t *sizeOut) const
{ … }
void ProgramGL::getAtomicCounterBufferSizeMap(std::map<int, unsigned int> *sizeMapOut) const
{ … }
bool ProgramGL::checkLinkStatus()
{ … }
void ProgramGL::markUnusedUniformLocations(std::vector<gl::VariableLocation> *uniformLocations,
std::vector<gl::SamplerBinding> *samplerBindings,
std::vector<gl::ImageBinding> *imageBindings)
{ … }
void ProgramGL::linkResources(const gl::ProgramLinkedResources &resources)
{ … }
void ProgramGL::onUniformBlockBinding(gl::UniformBlockIndex uniformBlockIndex)
{ … }
}