The Vulkan layers and extensions wrangler. More...
#include <capabilities_gles.h>
Public Member Functions | |
| CapabilitiesGLES (const ProcTableGLES &gl) | |
| CapabilitiesGLES (const CapabilitiesGLES &)=delete | |
| CapabilitiesGLES (CapabilitiesGLES &&)=delete | |
| CapabilitiesGLES & | operator= (const CapabilitiesGLES &)=delete |
| CapabilitiesGLES & | operator= (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 CapabilitiesGLES & | Cast (Capabilities &base) |
| static const CapabilitiesGLES & | Cast (const Capabilities &base) |
| static CapabilitiesGLES * | Cast (Capabilities *base) |
| static const CapabilitiesGLES * | Cast (const Capabilities *base) |
Protected Member Functions inherited from impeller::Capabilities | |
| Capabilities () | |
| Capabilities (const Capabilities &)=delete | |
| Capabilities & | operator= (const Capabilities &)=delete |
The Vulkan layers and extensions wrangler.
Definition at line 23 of file capabilities_gles.h.
|
explicit |
Definition at line 58 of file capabilities_gles.cc.
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.
|
delete |
|
delete |
|
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.
|
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.
|
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.
|
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.
References impeller::kS8UInt.
|
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.
References max_texture_size.
| size_t impeller::CapabilitiesGLES::GetMaxTextureUnits | ( | ShaderStage | stage | ) | const |
Definition at line 223 of file capabilities_gles.cc.
References FML_UNREACHABLE, impeller::kCompute, impeller::kFragment, impeller::kUnknown, impeller::kVertex, max_texture_image_units, and max_vertex_texture_image_units.
|
overridevirtual |
The minimum alignment of uniform value offsets in bytes.
Implements impeller::Capabilities.
Definition at line 338 of file capabilities_gles.cc.
| bool impeller::CapabilitiesGLES::IsANGLE | ( | ) | const |
Definition at line 292 of file capabilities_gles.cc.
| 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.
|
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.
|
delete |
|
delete |
|
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.
|
overridevirtual |
Whether the context backend supports ComputePass.
Implements impeller::Capabilities.
Definition at line 256 of file capabilities_gles.cc.
|
overridevirtual |
Whether the context backend supports configuring ComputePass command subgroups.
Implements impeller::Capabilities.
Definition at line 260 of file capabilities_gles.cc.
|
overridevirtual |
Whether the context backend supports SamplerAddressMode::Decal.
Implements impeller::Capabilities.
Definition at line 268 of file capabilities_gles.cc.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
overridevirtual |
Whether the context backend supports attaching offscreen MSAA color/stencil textures.
Implements impeller::Capabilities.
Definition at line 236 of file capabilities_gles.cc.
|
overridevirtual |
Whether primitive restart is supported.
Implements impeller::Capabilities.
Definition at line 296 of file capabilities_gles.cc.
|
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.
|
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.
|
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.
References impeller::kASTC, impeller::kASTCHDR, impeller::kBC, and impeller::kETC2.
| 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.
|
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.
|
overridevirtual |
Whether the primitive type TriangleFan is supported by the backend.
Implements impeller::Capabilities.
Definition at line 276 of file capabilities_gles.cc.
| size_t impeller::CapabilitiesGLES::max_combined_texture_image_units = 8 |
Definition at line 38 of file capabilities_gles.h.
Referenced by CapabilitiesGLES().
| size_t impeller::CapabilitiesGLES::max_cube_map_texture_size = 16 |
Definition at line 41 of file capabilities_gles.h.
Referenced by CapabilitiesGLES().
| size_t impeller::CapabilitiesGLES::max_fragment_uniform_vectors = 16 |
Definition at line 44 of file capabilities_gles.h.
Referenced by CapabilitiesGLES().
| size_t impeller::CapabilitiesGLES::max_renderbuffer_size = 1 |
Definition at line 47 of file capabilities_gles.h.
Referenced by CapabilitiesGLES().
| size_t impeller::CapabilitiesGLES::max_texture_image_units = 8 |
Definition at line 50 of file capabilities_gles.h.
Referenced by CapabilitiesGLES(), and GetMaxTextureUnits().
Definition at line 53 of file capabilities_gles.h.
Referenced by CapabilitiesGLES(), and GetMaximumRenderPassAttachmentSize().
| size_t impeller::CapabilitiesGLES::max_varying_vectors = 8 |
Definition at line 56 of file capabilities_gles.h.
Referenced by CapabilitiesGLES().
| size_t impeller::CapabilitiesGLES::max_vertex_attribs = 8 |
Definition at line 59 of file capabilities_gles.h.
Referenced by CapabilitiesGLES().
| size_t impeller::CapabilitiesGLES::max_vertex_texture_image_units = 0 |
Definition at line 62 of file capabilities_gles.h.
Referenced by CapabilitiesGLES(), and GetMaxTextureUnits().
| size_t impeller::CapabilitiesGLES::max_vertex_uniform_vectors = 128 |
Definition at line 65 of file capabilities_gles.h.
Referenced by CapabilitiesGLES().
| ISize impeller::CapabilitiesGLES::max_viewport_dims |
Definition at line 68 of file capabilities_gles.h.
Referenced by CapabilitiesGLES().
| size_t impeller::CapabilitiesGLES::num_compressed_texture_formats = 0 |
Definition at line 71 of file capabilities_gles.h.
Referenced by CapabilitiesGLES().
| size_t impeller::CapabilitiesGLES::num_shader_binary_formats = 0 |
Definition at line 74 of file capabilities_gles.h.
Referenced by CapabilitiesGLES().