13 std::unique_ptr<ProcTableGLES> gl,
14 const std::vector<std::shared_ptr<fml::Mapping>>& shader_libraries) {
15 return std::shared_ptr<ContextGLES>(
19 ContextGLES::ContextGLES(std::unique_ptr<ProcTableGLES> gl,
20 const std::vector<std::shared_ptr<fml::Mapping>>&
21 shader_libraries_mappings) {
22 reactor_ = std::make_shared<ReactorGLES>(std::move(gl));
23 if (!reactor_->IsValid()) {
30 auto library = std::shared_ptr<ShaderLibraryGLES>(
31 new ShaderLibraryGLES(shader_libraries_mappings));
32 if (!library->IsValid()) {
36 shader_library_ = std::move(library);
42 std::shared_ptr<PipelineLibraryGLES>(
new PipelineLibraryGLES(reactor_));
48 std::shared_ptr<AllocatorGLES>(
new AllocatorGLES(reactor_));
49 if (!resource_allocator_->IsValid()) {
58 std::shared_ptr<SamplerLibraryGLES>(
new SamplerLibraryGLES());
63 device_capabilities_ =
65 .SetSupportsOffscreenMSAA(
false)
66 .SetSupportsSSBO(
false)
67 .SetSupportsBufferToTextureBlits(
false)
68 .SetSupportsTextureToTextureBlits(
69 reactor_->GetProcTable().BlitFramebuffer.IsAvailable())
70 .SetSupportsFramebufferFetch(
false)
74 .SetSupportsCompute(
false)
75 .SetSupportsComputeSubgroups(
false)
76 .SetSupportsReadFromResolve(
false)
77 .SetSupportsReadFromOnscreenTexture(
false)
78 .SetSupportsDecalSamplerAddressMode(
false)
79 .SetSupportsDeviceTransientTextures(
false)
97 const std::shared_ptr<ReactorGLES::Worker>& worker) {
101 return reactor_->AddWorker(worker);
108 return reactor_->RemoveWorker(
id);
111 bool ContextGLES::IsValid()
const {
115 void ContextGLES::Shutdown() {}
118 std::string ContextGLES::DescribeGpuModel()
const {
119 return reactor_->GetProcTable().GetDescription()->GetString();
123 std::shared_ptr<Allocator> ContextGLES::GetResourceAllocator()
const {
124 return resource_allocator_;
128 std::shared_ptr<ShaderLibrary> ContextGLES::GetShaderLibrary()
const {
129 return shader_library_;
133 std::shared_ptr<SamplerLibrary> ContextGLES::GetSamplerLibrary()
const {
134 return sampler_library_;
138 std::shared_ptr<PipelineLibrary> ContextGLES::GetPipelineLibrary()
const {
139 return pipeline_library_;
143 std::shared_ptr<CommandBuffer> ContextGLES::CreateCommandBuffer()
const {
144 return std::shared_ptr<CommandBufferGLES>(
145 new CommandBufferGLES(weak_from_this(), reactor_));
149 const std::shared_ptr<const Capabilities>& ContextGLES::GetCapabilities()
151 return device_capabilities_;