Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
impeller::CapabilitiesGLES Class Referencefinal

The Vulkan layers and extensions wrangler. More...

#include <capabilities_gles.h>

Inheritance diagram for impeller::CapabilitiesGLES:
impeller::Capabilities impeller::BackendCast< CapabilitiesGLES, Capabilities >

Public Member Functions

 CapabilitiesGLES (const ProcTableGLES &gl)
 
 CapabilitiesGLES (const CapabilitiesGLES &)=delete
 
 CapabilitiesGLES (CapabilitiesGLES &&)=delete
 
CapabilitiesGLESoperator= (const CapabilitiesGLES &)=delete
 
CapabilitiesGLESoperator= (CapabilitiesGLES &&)=delete
 
size_t GetMaxTextureUnits (ShaderStage stage) const
 
bool IsANGLE () const
 
bool IsES () const
 Whether this is an ES GL variant or (if false) desktop GL.
 
bool SupportsFramebufferRenderMipmap () const override
 
bool SupportsTextureMaxLevel () const
 Whether GL_TEXTURE_MAX_LEVEL can be set to bound a texture's sampled mip range. Core on desktop GL and ES 3.0+; on ES 2.0 it requires the GL_APPLE_texture_max_level extension. Without it a partial mip chain cannot be made mipmap complete and samples as black.
 
bool SupportsOffscreenMSAA () const override
 Whether the context backend supports attaching offscreen MSAA color/stencil textures.
 
bool SupportsImplicitResolvingMSAA () const override
 Whether the context backend supports multisampled rendering to the on-screen surface without requiring an explicit resolve of the MSAA color attachment.
 
bool SupportsSSBO () const override
 Whether the context backend supports binding Shader Storage Buffer Objects (SSBOs) to pipelines.
 
bool SupportsTextureToTextureBlits () const override
 Whether the context backend supports blitting from one texture region to another texture region (via the relevant BlitPass::AddCopy overloads).
 
bool SupportsFramebufferFetch () const override
 Whether the context backend is able to support pipelines with shaders that read from the framebuffer (i.e. pixels that have been written by previous draw calls in the current render pass).
 
bool SupportsCompute () const override
 Whether the context backend supports ComputePass.
 
bool SupportsComputeSubgroups () const override
 Whether the context backend supports configuring ComputePass command subgroups.
 
bool SupportsReadFromResolve () const override
 Whether the context backend supports binding the current RenderPass attachments. This is supported if the backend can guarantee that attachment textures will not be mutated until the render pass has fully completed.
 
bool SupportsDecalSamplerAddressMode () const override
 Whether the context backend supports SamplerAddressMode::Decal.
 
bool SupportsDeviceTransientTextures () const override
 Whether the context backend supports allocating StorageMode::kDeviceTransient (aka "memoryless") textures, which are temporary textures kept in tile memory for the duration of the RenderPass it's attached to.
 
bool SupportsTriangleFan () const override
 Whether the primitive type TriangleFan is supported by the backend.
 
bool SupportsPrimitiveRestart () const override
 Whether primitive restart is supported.
 
bool Supports32BitPrimitiveIndices () const override
 Whether 32-bit values are supported in index buffers used to draw primitives.
 
bool SupportsManuallyMippedTextures () const override
 Whether a texture whose mip levels were uploaded by hand (rather than produced by BlitPass::GenerateMipmap) samples with correct per-level selection. True everywhere except OpenGL ES 2.0 without GL_APPLE_texture_max_level, where the sampled mip range cannot be bounded to the levels the texture declares.
 
bool SupportsExtendedRangeFormats () const override
 Whether the XR formats are supported on this device.
 
bool SupportsTextureCompression (CompressedTextureFamily family) const override
 Whether the given family of block-compressed texture formats is supported by this device. Compressed formats are sample-only and their support varies by hardware, so callers must check this before allocating a compressed texture.
 
PixelFormat GetDefaultColorFormat () const override
 Returns a supported PixelFormat for textures that store 4-channel colors (red/green/blue/alpha).
 
PixelFormat GetDefaultStencilFormat () const override
 Returns a supported PixelFormat for textures that store stencil information. May include a depth channel if a stencil-only format is not available.
 
PixelFormat GetDefaultDepthStencilFormat () const override
 Returns a supported PixelFormat for textures that store both a stencil and depth component. This will never return a depth-only or stencil-only texture. Returns PixelFormat::kUnknown if no suitable depth+stencil format was found.
 
PixelFormat GetDefaultGlyphAtlasFormat () const override
 Returns the default pixel format for the alpha bitmap glyph atlas.
 
ISize GetMaximumRenderPassAttachmentSize () const override
 Return the maximum size of a render pass attachment.
 
size_t GetMinimumUniformAlignment () const override
 The minimum alignment of uniform value offsets in bytes.
 
bool NeedsPartitionedHostBuffer () const override
 Whether the host buffer should use separate device buffers for indexes from other data.
 
- Public Member Functions inherited from impeller::Capabilities
virtual ~Capabilities ()
 
virtual size_t GetMinimumStorageBufferAlignment () const
 The minimum alignment of storage buffer value offsets in bytes.
 

Public Attributes

size_t max_combined_texture_image_units = 8
 
size_t max_cube_map_texture_size = 16
 
size_t max_fragment_uniform_vectors = 16
 
size_t max_renderbuffer_size = 1
 
size_t max_texture_image_units = 8
 
ISize max_texture_size = ISize{64, 64}
 
size_t max_varying_vectors = 8
 
size_t max_vertex_attribs = 8
 
size_t max_vertex_texture_image_units = 0
 
size_t max_vertex_uniform_vectors = 128
 
ISize max_viewport_dims
 
size_t num_compressed_texture_formats = 0
 
size_t num_shader_binary_formats = 0
 

Additional Inherited Members

- Static Public Member Functions inherited from impeller::BackendCast< CapabilitiesGLES, Capabilities >
static CapabilitiesGLESCast (Capabilities &base)
 
static const CapabilitiesGLESCast (const Capabilities &base)
 
static CapabilitiesGLESCast (Capabilities *base)
 
static const CapabilitiesGLESCast (const Capabilities *base)
 
- Protected Member Functions inherited from impeller::Capabilities
 Capabilities ()
 
 Capabilities (const Capabilities &)=delete
 
Capabilitiesoperator= (const Capabilities &)=delete
 

Detailed Description

The Vulkan layers and extensions wrangler.

Definition at line 23 of file capabilities_gles.h.

Constructor & Destructor Documentation

◆ CapabilitiesGLES() [1/3]

impeller::CapabilitiesGLES::CapabilitiesGLES ( const ProcTableGLES gl)
explicit

Definition at line 58 of file capabilities_gles.cc.

58 {
59 {
60 GLint value = 0;
61 gl.GetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &value);
63 }
64
65 {
66 GLint value = 0;
67 gl.GetIntegerv(GL_MAX_CUBE_MAP_TEXTURE_SIZE, &value);
69 }
70
71 auto const desc = gl.GetDescription();
72
73 if (desc->IsES()) {
74 GLint value = 0;
75 gl.GetIntegerv(GL_MAX_FRAGMENT_UNIFORM_VECTORS, &value);
77 }
78
79 {
80 GLint value = 0;
81 gl.GetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &value);
83 }
84
85 {
86 GLint value = 0;
87 gl.GetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &value);
89 }
90
91 {
92 GLint value = 0;
93 gl.GetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
95 }
96
97 if (desc->IsES()) {
98 GLint value = 0;
99 gl.GetIntegerv(GL_MAX_VARYING_VECTORS, &value);
101 }
102
103 {
104 GLint value = 0;
105 gl.GetIntegerv(GL_MAX_VERTEX_ATTRIBS, &value);
107 }
108
109 {
110 GLint value = 0;
111 gl.GetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &value);
113 }
114
115 if (desc->IsES()) {
116 GLint value = 0;
117 gl.GetIntegerv(GL_MAX_VERTEX_UNIFORM_VECTORS, &value);
119 }
120
121 {
122 GLint values[2] = {};
123 gl.GetIntegerv(GL_MAX_VIEWPORT_DIMS, values);
124 max_viewport_dims = ISize{values[0], values[1]};
125 }
126
127 {
128 GLint value = 0;
129 gl.GetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &value);
131 }
132
133 if (desc->IsES()) {
134 GLint value = 0;
135 gl.GetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &value);
137 }
138
139 if (desc->IsES()) {
140 default_glyph_atlas_format_ = PixelFormat::kA8UNormInt;
141 } else {
142 default_glyph_atlas_format_ = PixelFormat::kR8UNormInt;
143 }
144
145 if (desc->GetGlVersion().major_version >= 3) {
146 supports_texture_to_texture_blits_ = true;
147 }
148
149 supports_framebuffer_fetch_ = desc->HasExtension(kFramebufferFetchExt);
150
151 if (desc->HasExtension(kTextureBorderClampExt) ||
152 desc->HasExtension(kNvidiaTextureBorderClampExt)) {
153 supports_decal_sampler_address_mode_ = true;
154 }
155
156 if (desc->HasExtension(kElementIndexUintExt)) {
157 supports_32bit_primitive_indices_ = true;
158 }
159
160 if (desc->HasExtension(kMultisampledRenderToTextureExt)) {
161 supports_implicit_msaa_ = true;
162
163 if (desc->HasExtension(kMultisampledRenderToTexture2Ext)) {
164 // We hard-code 4x MSAA, so let's make sure it's supported.
165 GLint value = 0;
166 gl.GetIntegerv(GL_MAX_SAMPLES_EXT, &value);
167 supports_offscreen_msaa_ = value >= 4;
168 }
169 } else if (desc->GetGlVersion().major_version >= 3 && desc->IsES()) {
170 GLint value = 0;
171 gl.GetIntegerv(GL_MAX_SAMPLES, &value);
172 supports_offscreen_msaa_ = value >= 4;
173 }
174 is_es_ = desc->IsES();
175 is_angle_ = desc->IsANGLE();
176
177 // ETC2 and EAC are mandatory in OpenGL ES 3.0. BC and ASTC are gated behind
178 // extensions and are not present on most mobile or desktop GLES. The whole BC
179 // family requires S3TC, RGTC, and BPTC to all be present.
180 supports_texture_compression_bc_ =
181 desc->HasExtension(kTextureCompressionS3TCExt) &&
182 desc->HasExtension(kTextureCompressionRGTCExt) &&
183 desc->HasExtension(kTextureCompressionBPTCExt);
184 // Either extension is sufficient: both expose the same LDR 2D ASTC internal
185 // formats this backend uses. KHR is the common one; OES is a superset that
186 // also adds HDR and 3D, which are not used here.
187 supports_texture_compression_astc_ =
188 desc->HasExtension(kTextureCompressionAstcLdrExt) ||
189 desc->HasExtension(kTextureCompressionAstcOesExt);
190 // HDR reuses the same internal formats as LDR, gated by a separate extension.
191 // The OES extension is a superset that also covers HDR.
192 supports_texture_compression_astc_hdr_ =
193 desc->HasExtension(kTextureCompressionAstcHdrExt) ||
194 desc->HasExtension(kTextureCompressionAstcOesExt);
195 supports_texture_compression_etc2_ =
196 desc->IsES() && desc->GetGlVersion().major_version >= 3;
197
198 // GL_TEXTURE_MAX_LEVEL is core on desktop GL and ES 3.0+, and available on
199 // ES 2.0 through GL_APPLE_texture_max_level.
200 supports_texture_max_level_ = !desc->IsES() ||
201 desc->GetGlVersion().major_version >= 3 ||
202 desc->HasExtension(kAppleTextureMaxLevelExt);
203}
int32_t value
static const constexpr char * kTextureCompressionAstcOesExt
static const constexpr char * kMultisampledRenderToTexture2Ext
static const constexpr char * kTextureCompressionAstcHdrExt
static const constexpr char * kMultisampledRenderToTextureExt
static const constexpr char * kTextureCompressionBPTCExt
static const constexpr char * kTextureCompressionAstcLdrExt
static const constexpr char * kTextureCompressionRGTCExt
static const constexpr char * kTextureCompressionS3TCExt
static const constexpr char * kTextureBorderClampExt
static const constexpr char * kNvidiaTextureBorderClampExt
static const constexpr char * kAppleTextureMaxLevelExt
static const constexpr char * kFramebufferFetchExt
ISize64 ISize
Definition size.h:162
static const constexpr char * kElementIndexUintExt

References impeller::ProcTableGLES::GetDescription(), impeller::kA8UNormInt, impeller::kAppleTextureMaxLevelExt, impeller::kElementIndexUintExt, impeller::kFramebufferFetchExt, impeller::kMultisampledRenderToTexture2Ext, impeller::kMultisampledRenderToTextureExt, impeller::kNvidiaTextureBorderClampExt, impeller::kR8UNormInt, impeller::kTextureBorderClampExt, impeller::kTextureCompressionAstcHdrExt, impeller::kTextureCompressionAstcLdrExt, impeller::kTextureCompressionAstcOesExt, impeller::kTextureCompressionBPTCExt, impeller::kTextureCompressionRGTCExt, impeller::kTextureCompressionS3TCExt, max_combined_texture_image_units, max_cube_map_texture_size, max_fragment_uniform_vectors, max_renderbuffer_size, max_texture_image_units, max_texture_size, max_varying_vectors, max_vertex_attribs, max_vertex_texture_image_units, max_vertex_uniform_vectors, max_viewport_dims, num_compressed_texture_formats, num_shader_binary_formats, and value.

◆ CapabilitiesGLES() [2/3]

impeller::CapabilitiesGLES::CapabilitiesGLES ( const CapabilitiesGLES )
delete

◆ CapabilitiesGLES() [3/3]

impeller::CapabilitiesGLES::CapabilitiesGLES ( CapabilitiesGLES &&  )
delete

Member Function Documentation

◆ GetDefaultColorFormat()

PixelFormat impeller::CapabilitiesGLES::GetDefaultColorFormat ( ) const
overridevirtual

Returns a supported PixelFormat for textures that store 4-channel colors (red/green/blue/alpha).

Implements impeller::Capabilities.

Definition at line 280 of file capabilities_gles.cc.

References impeller::kR8G8B8A8UNormInt.

◆ GetDefaultDepthStencilFormat()

PixelFormat impeller::CapabilitiesGLES::GetDefaultDepthStencilFormat ( ) const
overridevirtual

Returns a supported PixelFormat for textures that store both a stencil and depth component. This will never return a depth-only or stencil-only texture. Returns PixelFormat::kUnknown if no suitable depth+stencil format was found.

Implements impeller::Capabilities.

Definition at line 288 of file capabilities_gles.cc.

References impeller::kD24UnormS8Uint.

◆ GetDefaultGlyphAtlasFormat()

PixelFormat impeller::CapabilitiesGLES::GetDefaultGlyphAtlasFormat ( ) const
overridevirtual

Returns the default pixel format for the alpha bitmap glyph atlas.

   Some backends may use Red channel while others use grey. This
   should not have any impact 

Implements impeller::Capabilities.

Definition at line 330 of file capabilities_gles.cc.

330 {
331 return default_glyph_atlas_format_;
332}

◆ GetDefaultStencilFormat()

PixelFormat impeller::CapabilitiesGLES::GetDefaultStencilFormat ( ) const
overridevirtual

Returns a supported PixelFormat for textures that store stencil information. May include a depth channel if a stencil-only format is not available.

Implements impeller::Capabilities.

Definition at line 284 of file capabilities_gles.cc.

284 {
286}

References impeller::kS8UInt.

◆ GetMaximumRenderPassAttachmentSize()

ISize impeller::CapabilitiesGLES::GetMaximumRenderPassAttachmentSize ( ) const
overridevirtual

Return the maximum size of a render pass attachment.

Note that this may be smaller than the maximum allocatable texture size.

Implements impeller::Capabilities.

Definition at line 334 of file capabilities_gles.cc.

334 {
335 return max_texture_size;
336}

References max_texture_size.

◆ GetMaxTextureUnits()

size_t impeller::CapabilitiesGLES::GetMaxTextureUnits ( ShaderStage  stage) const

◆ GetMinimumUniformAlignment()

size_t impeller::CapabilitiesGLES::GetMinimumUniformAlignment ( ) const
overridevirtual

The minimum alignment of uniform value offsets in bytes.

Implements impeller::Capabilities.

Definition at line 338 of file capabilities_gles.cc.

338 {
339 return 256;
340}

◆ IsANGLE()

bool impeller::CapabilitiesGLES::IsANGLE ( ) const

Definition at line 292 of file capabilities_gles.cc.

292 {
293 return is_angle_;
294}

◆ IsES()

bool impeller::CapabilitiesGLES::IsES ( ) const

Whether this is an ES GL variant or (if false) desktop GL.

Definition at line 205 of file capabilities_gles.cc.

205 {
206 return is_es_;
207}

◆ NeedsPartitionedHostBuffer()

bool impeller::CapabilitiesGLES::NeedsPartitionedHostBuffer ( ) const
overridevirtual

Whether the host buffer should use separate device buffers for indexes from other data.

Implements impeller::Capabilities.

Definition at line 342 of file capabilities_gles.cc.

342 {
343#ifdef FML_OS_EMSCRIPTEN
344 // WebGL has special requirements here to keep indexes and other data
345 // separate. See
346 // https://registry.khronos.org/webgl/specs/latest/2.0/#BUFFER_OBJECT_BINDING
347 return true;
348#else
349 return false;
350#endif
351}

◆ operator=() [1/2]

CapabilitiesGLES & impeller::CapabilitiesGLES::operator= ( CapabilitiesGLES &&  )
delete

◆ operator=() [2/2]

CapabilitiesGLES & impeller::CapabilitiesGLES::operator= ( const CapabilitiesGLES )
delete

◆ Supports32BitPrimitiveIndices()

bool impeller::CapabilitiesGLES::Supports32BitPrimitiveIndices ( ) const
overridevirtual

Whether 32-bit values are supported in index buffers used to draw primitives.

Implements impeller::Capabilities.

Definition at line 300 of file capabilities_gles.cc.

300 {
301 return supports_32bit_primitive_indices_;
302}

◆ SupportsCompute()

bool impeller::CapabilitiesGLES::SupportsCompute ( ) const
overridevirtual

Whether the context backend supports ComputePass.

Implements impeller::Capabilities.

Definition at line 256 of file capabilities_gles.cc.

256 {
257 return false;
258}

◆ SupportsComputeSubgroups()

bool impeller::CapabilitiesGLES::SupportsComputeSubgroups ( ) const
overridevirtual

Whether the context backend supports configuring ComputePass command subgroups.

Implements impeller::Capabilities.

Definition at line 260 of file capabilities_gles.cc.

260 {
261 return false;
262}

◆ SupportsDecalSamplerAddressMode()

bool impeller::CapabilitiesGLES::SupportsDecalSamplerAddressMode ( ) const
overridevirtual

Whether the context backend supports SamplerAddressMode::Decal.

Implements impeller::Capabilities.

Definition at line 268 of file capabilities_gles.cc.

268 {
269 return supports_decal_sampler_address_mode_;
270}

◆ SupportsDeviceTransientTextures()

bool impeller::CapabilitiesGLES::SupportsDeviceTransientTextures ( ) const
overridevirtual

Whether the context backend supports allocating StorageMode::kDeviceTransient (aka "memoryless") textures, which are temporary textures kept in tile memory for the duration of the RenderPass it's attached to.

This feature is especially useful for MSAA and stencils.

Implements impeller::Capabilities.

Definition at line 272 of file capabilities_gles.cc.

272 {
273 return false;
274}

◆ SupportsExtendedRangeFormats()

bool impeller::CapabilitiesGLES::SupportsExtendedRangeFormats ( ) const
overridevirtual

Whether the XR formats are supported on this device.

This is only ever true for iOS and macOS devices. We may need to revisit this API when approaching wide gamut rendering for Vulkan and GLES.

Implements impeller::Capabilities.

Definition at line 311 of file capabilities_gles.cc.

311 {
312 return false;
313}

◆ SupportsFramebufferFetch()

bool impeller::CapabilitiesGLES::SupportsFramebufferFetch ( ) const
overridevirtual

Whether the context backend is able to support pipelines with shaders that read from the framebuffer (i.e. pixels that have been written by previous draw calls in the current render pass).

Example of reading from the first color attachment in a GLSL shader: ``` uniform subpassInput subpass_input;

out vec4 frag_color;

void main() { vec4 color = subpassLoad(subpass_input); // Invert the colors drawn to the framebuffer. frag_color = vec4(vec3(1) - color.rgb, color.a); } ```

Implements impeller::Capabilities.

Definition at line 252 of file capabilities_gles.cc.

252 {
253 return supports_framebuffer_fetch_;
254}

◆ SupportsFramebufferRenderMipmap()

bool impeller::CapabilitiesGLES::SupportsFramebufferRenderMipmap ( ) const
overridevirtual

Always false. Rendering into a non-zero mip level is not yet implemented on the GLES backend; see SupportsFramebufferRenderMipmap in the .cc file.

Implements impeller::Capabilities.

Definition at line 209 of file capabilities_gles.cc.

209 {
210 // Rendering into a non-zero mip level is not yet supported on the GLES
211 // backend. The texture storage path allocates levels with mutable, lazily
212 // allocated glTexImage2D storage, which yields an incomplete framebuffer
213 // when a non-base mip level is attached. Until that is reworked, do not
214 // advertise the capability so callers fall back instead of failing to
215 // create the framebuffer. Rendering into a cube map face is unaffected.
216 return false;
217}

◆ SupportsImplicitResolvingMSAA()

bool impeller::CapabilitiesGLES::SupportsImplicitResolvingMSAA ( ) const
overridevirtual

Whether the context backend supports multisampled rendering to the on-screen surface without requiring an explicit resolve of the MSAA color attachment.

Implements impeller::Capabilities.

Definition at line 240 of file capabilities_gles.cc.

240 {
241 return supports_implicit_msaa_;
242}

◆ SupportsManuallyMippedTextures()

bool impeller::CapabilitiesGLES::SupportsManuallyMippedTextures ( ) const
overridevirtual

Whether a texture whose mip levels were uploaded by hand (rather than produced by BlitPass::GenerateMipmap) samples with correct per-level selection. True everywhere except OpenGL ES 2.0 without GL_APPLE_texture_max_level, where the sampled mip range cannot be bounded to the levels the texture declares.

Implements impeller::Capabilities.

Definition at line 304 of file capabilities_gles.cc.

304 {
305 // Without GL_TEXTURE_MAX_LEVEL the sampled mip range cannot be bounded to
306 // the levels the texture declares, so a hand-uploaded chain is mipmap
307 // incomplete and samples as black.
308 return supports_texture_max_level_;
309}

◆ SupportsOffscreenMSAA()

bool impeller::CapabilitiesGLES::SupportsOffscreenMSAA ( ) const
overridevirtual

Whether the context backend supports attaching offscreen MSAA color/stencil textures.

Implements impeller::Capabilities.

Definition at line 236 of file capabilities_gles.cc.

236 {
237 return supports_offscreen_msaa_;
238}

◆ SupportsPrimitiveRestart()

bool impeller::CapabilitiesGLES::SupportsPrimitiveRestart ( ) const
overridevirtual

Whether primitive restart is supported.

Implements impeller::Capabilities.

Definition at line 296 of file capabilities_gles.cc.

296 {
297 return false;
298}

◆ SupportsReadFromResolve()

bool impeller::CapabilitiesGLES::SupportsReadFromResolve ( ) const
overridevirtual

Whether the context backend supports binding the current RenderPass attachments. This is supported if the backend can guarantee that attachment textures will not be mutated until the render pass has fully completed.

This is possible because many mobile graphics cards track RenderPass attachment state in intermediary tile memory prior to Storing the pass in the heap allocated attachments on DRAM. Metal's hazard tracking and Vulkan's barriers are granular enough to allow for safely accessing attachment textures prior to storage in the same RenderPass.

Implements impeller::Capabilities.

Definition at line 264 of file capabilities_gles.cc.

264 {
265 return false;
266}

◆ SupportsSSBO()

bool impeller::CapabilitiesGLES::SupportsSSBO ( ) const
overridevirtual

Whether the context backend supports binding Shader Storage Buffer Objects (SSBOs) to pipelines.

Implements impeller::Capabilities.

Definition at line 244 of file capabilities_gles.cc.

244 {
245 return false;
246}

◆ SupportsTextureCompression()

bool impeller::CapabilitiesGLES::SupportsTextureCompression ( CompressedTextureFamily  family) const
overridevirtual

Whether the given family of block-compressed texture formats is supported by this device. Compressed formats are sample-only and their support varies by hardware, so callers must check this before allocating a compressed texture.

Implements impeller::Capabilities.

Definition at line 315 of file capabilities_gles.cc.

316 {
317 switch (family) {
319 return supports_texture_compression_bc_;
321 return supports_texture_compression_etc2_;
323 return supports_texture_compression_astc_;
325 return supports_texture_compression_astc_hdr_;
326 }
327 return false;
328}
@ kASTCHDR
ASTC HDR. A separate device feature from ASTC LDR.
@ kBC
S3TC, RGTC, and BPTC (BC1 through BC7). Desktop GPUs.
@ kETC2
ETC2 and EAC. Mobile, OpenGL ES 3.0, and WebGL2.
@ kASTC
ASTC LDR. Modern mobile and some desktop.

References impeller::kASTC, impeller::kASTCHDR, impeller::kBC, and impeller::kETC2.

◆ SupportsTextureMaxLevel()

bool impeller::CapabilitiesGLES::SupportsTextureMaxLevel ( ) const

Whether GL_TEXTURE_MAX_LEVEL can be set to bound a texture's sampled mip range. Core on desktop GL and ES 3.0+; on ES 2.0 it requires the GL_APPLE_texture_max_level extension. Without it a partial mip chain cannot be made mipmap complete and samples as black.

Definition at line 219 of file capabilities_gles.cc.

219 {
220 return supports_texture_max_level_;
221}

◆ SupportsTextureToTextureBlits()

bool impeller::CapabilitiesGLES::SupportsTextureToTextureBlits ( ) const
overridevirtual

Whether the context backend supports blitting from one texture region to another texture region (via the relevant BlitPass::AddCopy overloads).

Implements impeller::Capabilities.

Definition at line 248 of file capabilities_gles.cc.

248 {
249 return supports_texture_to_texture_blits_;
250}

◆ SupportsTriangleFan()

bool impeller::CapabilitiesGLES::SupportsTriangleFan ( ) const
overridevirtual

Whether the primitive type TriangleFan is supported by the backend.

Implements impeller::Capabilities.

Definition at line 276 of file capabilities_gles.cc.

276 {
277 return true;
278}

Member Data Documentation

◆ max_combined_texture_image_units

size_t impeller::CapabilitiesGLES::max_combined_texture_image_units = 8

Definition at line 38 of file capabilities_gles.h.

Referenced by CapabilitiesGLES().

◆ max_cube_map_texture_size

size_t impeller::CapabilitiesGLES::max_cube_map_texture_size = 16

Definition at line 41 of file capabilities_gles.h.

Referenced by CapabilitiesGLES().

◆ max_fragment_uniform_vectors

size_t impeller::CapabilitiesGLES::max_fragment_uniform_vectors = 16

Definition at line 44 of file capabilities_gles.h.

Referenced by CapabilitiesGLES().

◆ max_renderbuffer_size

size_t impeller::CapabilitiesGLES::max_renderbuffer_size = 1

Definition at line 47 of file capabilities_gles.h.

Referenced by CapabilitiesGLES().

◆ max_texture_image_units

size_t impeller::CapabilitiesGLES::max_texture_image_units = 8

Definition at line 50 of file capabilities_gles.h.

Referenced by CapabilitiesGLES(), and GetMaxTextureUnits().

◆ max_texture_size

ISize impeller::CapabilitiesGLES::max_texture_size = ISize{64, 64}

Definition at line 53 of file capabilities_gles.h.

53{64, 64};

Referenced by CapabilitiesGLES(), and GetMaximumRenderPassAttachmentSize().

◆ max_varying_vectors

size_t impeller::CapabilitiesGLES::max_varying_vectors = 8

Definition at line 56 of file capabilities_gles.h.

Referenced by CapabilitiesGLES().

◆ max_vertex_attribs

size_t impeller::CapabilitiesGLES::max_vertex_attribs = 8

Definition at line 59 of file capabilities_gles.h.

Referenced by CapabilitiesGLES().

◆ max_vertex_texture_image_units

size_t impeller::CapabilitiesGLES::max_vertex_texture_image_units = 0

Definition at line 62 of file capabilities_gles.h.

Referenced by CapabilitiesGLES(), and GetMaxTextureUnits().

◆ max_vertex_uniform_vectors

size_t impeller::CapabilitiesGLES::max_vertex_uniform_vectors = 128

Definition at line 65 of file capabilities_gles.h.

Referenced by CapabilitiesGLES().

◆ max_viewport_dims

ISize impeller::CapabilitiesGLES::max_viewport_dims

Definition at line 68 of file capabilities_gles.h.

Referenced by CapabilitiesGLES().

◆ num_compressed_texture_formats

size_t impeller::CapabilitiesGLES::num_compressed_texture_formats = 0

Definition at line 71 of file capabilities_gles.h.

Referenced by CapabilitiesGLES().

◆ num_shader_binary_formats

size_t impeller::CapabilitiesGLES::num_shader_binary_formats = 0

Definition at line 74 of file capabilities_gles.h.

Referenced by CapabilitiesGLES().


The documentation for this class was generated from the following files: