21     return supports_offscreen_msaa_;
 
   32     return supports_texture_to_texture_blits_;
 
   37     return supports_framebuffer_fetch_;
 
   45     return supports_compute_subgroups_;
 
   50     return supports_read_from_resolve_;
 
   55     return supports_decal_sampler_address_mode_;
 
   63     return default_color_format_;
 
   68     return default_stencil_format_;
 
   73     return default_depth_stencil_format_;
 
   78     return supports_device_transient_textures_;
 
   83     return default_glyph_atlas_format_;
 
   88     return default_maximum_render_pass_attachment_size_;
 
   96     return supports_extended_range_formats_;
 
  101     return minimum_uniform_alignment_;
 
  107                        bool supports_texture_to_texture_blits,
 
  108                        bool supports_framebuffer_fetch,
 
  109                        bool supports_compute,
 
  110                        bool supports_compute_subgroups,
 
  111                        bool supports_read_from_resolve,
 
  112                        bool supports_decal_sampler_address_mode,
 
  113                        bool supports_device_transient_textures,
 
  114                        bool supports_triangle_fan,
 
  115                        bool supports_extended_range_formats,
 
  120                        ISize default_maximum_render_pass_attachment_size,
 
  121                        size_t minimum_uniform_alignment)
 
  122       : supports_offscreen_msaa_(supports_offscreen_msaa),
 
  123         supports_ssbo_(supports_ssbo),
 
  124         supports_texture_to_texture_blits_(supports_texture_to_texture_blits),
 
  125         supports_framebuffer_fetch_(supports_framebuffer_fetch),
 
  126         supports_compute_(supports_compute),
 
  127         supports_compute_subgroups_(supports_compute_subgroups),
 
  128         supports_read_from_resolve_(supports_read_from_resolve),
 
  129         supports_decal_sampler_address_mode_(
 
  130             supports_decal_sampler_address_mode),
 
  131         supports_device_transient_textures_(supports_device_transient_textures),
 
  132         supports_triangle_fan_(supports_triangle_fan),
 
  133         supports_extended_range_formats_(supports_extended_range_formats),
 
  134         default_color_format_(default_color_format),
 
  135         default_stencil_format_(default_stencil_format),
 
  136         default_depth_stencil_format_(default_depth_stencil_format),
 
  137         default_glyph_atlas_format_(default_glyph_atlas_format),
 
  138         default_maximum_render_pass_attachment_size_(
 
  139             default_maximum_render_pass_attachment_size),
 
  140         minimum_uniform_alignment_(minimum_uniform_alignment) {}
 
  144   bool supports_offscreen_msaa_ = 
false;
 
  145   bool supports_ssbo_ = 
false;
 
  146   bool supports_texture_to_texture_blits_ = 
false;
 
  147   bool supports_framebuffer_fetch_ = 
false;
 
  148   bool supports_compute_ = 
false;
 
  149   bool supports_compute_subgroups_ = 
false;
 
  150   bool supports_read_from_resolve_ = 
false;
 
  151   bool supports_decal_sampler_address_mode_ = 
false;
 
  152   bool supports_device_transient_textures_ = 
false;
 
  153   bool supports_triangle_fan_ = 
false;
 
  154   bool supports_extended_range_formats_ = 
false;
 
  159   ISize default_maximum_render_pass_attachment_size_ = 
ISize(1, 1);
 
  160   size_t minimum_uniform_alignment_ = 256;
 
  172   supports_offscreen_msaa_ = 
value;
 
  177   supports_ssbo_ = 
value;
 
  183   supports_texture_to_texture_blits_ = 
value;
 
  189   supports_framebuffer_fetch_ = 
value;
 
  194   supports_compute_ = 
value;
 
  200   supports_compute_subgroups_ = 
value;
 
  206   default_color_format_ = 
value;
 
  212   default_stencil_format_ = 
value;
 
  218   default_depth_stencil_format_ = 
value;
 
  223     bool read_from_resolve) {
 
  224   supports_read_from_resolve_ = read_from_resolve;
 
  230   supports_decal_sampler_address_mode_ = 
value;
 
  236   supports_device_transient_textures_ = 
value;
 
  242   default_glyph_atlas_format_ = 
value;
 
  247   supports_triangle_fan_ = 
value;
 
  253   default_maximum_render_pass_attachment_size_ = size;
 
  259   supports_extended_range_formats_ = 
value;
 
  265   minimum_uniform_alignment_ = 
value;
 
  272       supports_offscreen_msaa_,                                            
 
  274       supports_texture_to_texture_blits_,                                  
 
  275       supports_framebuffer_fetch_,                                         
 
  277       supports_compute_subgroups_,                                         
 
  278       supports_read_from_resolve_,                                         
 
  279       supports_decal_sampler_address_mode_,                                
 
  280       supports_device_transient_textures_,                                 
 
  281       supports_triangle_fan_,                                              
 
  282       supports_extended_range_formats_,                                    
 
  287       default_maximum_render_pass_attachment_size_.value_or(
ISize{1, 1}),  
 
  288       minimum_uniform_alignment_                                           
 
CapabilitiesBuilder & SetDefaultColorFormat(PixelFormat value)
CapabilitiesBuilder & SetSupportsComputeSubgroups(bool value)
CapabilitiesBuilder & SetMinimumUniformAlignment(size_t value)
CapabilitiesBuilder & SetSupportsTextureToTextureBlits(bool value)
CapabilitiesBuilder & SetDefaultStencilFormat(PixelFormat value)
CapabilitiesBuilder & SetSupportsDeviceTransientTextures(bool value)
CapabilitiesBuilder & SetSupportsTriangleFan(bool value)
CapabilitiesBuilder & SetSupportsFramebufferFetch(bool value)
CapabilitiesBuilder & SetSupportsDecalSamplerAddressMode(bool value)
CapabilitiesBuilder & SetSupportsOffscreenMSAA(bool value)
CapabilitiesBuilder & SetSupportsSSBO(bool value)
CapabilitiesBuilder & SetMaximumRenderPassAttachmentSize(ISize size)
CapabilitiesBuilder & SetSupportsExtendedRangeFormats(bool value)
CapabilitiesBuilder & SetDefaultGlyphAtlasFormat(PixelFormat value)
CapabilitiesBuilder & SetSupportsCompute(bool value)
std::unique_ptr< Capabilities > Build()
CapabilitiesBuilder & SetDefaultDepthStencilFormat(PixelFormat value)
CapabilitiesBuilder & SetSupportsReadFromResolve(bool value)
~StandardCapabilities() override=default
bool SupportsReadFromResolve() const override
Whether the context backend supports binding the current RenderPass attachments. This is supported if...
PixelFormat GetDefaultDepthStencilFormat() const override
Returns a supported PixelFormat for textures that store both a stencil and depth component....
bool SupportsComputeSubgroups() const override
Whether the context backend supports configuring ComputePass command subgroups.
bool SupportsOffscreenMSAA() const override
Whether the context backend supports attaching offscreen MSAA color/stencil textures.
ISize GetMaximumRenderPassAttachmentSize() const override
Return the maximum size of a render pass attachment.
bool SupportsTextureToTextureBlits() const override
Whether the context backend supports blitting from one texture region to another texture region (via ...
bool SupportsFramebufferFetch() const override
Whether the context backend is able to support pipelines with shaders that read from the framebuffer ...
PixelFormat GetDefaultGlyphAtlasFormat() const override
Returns the default pixel format for the alpha bitmap glyph atlas.
PixelFormat GetDefaultStencilFormat() const override
Returns a supported PixelFormat for textures that store stencil information. May include a depth chan...
bool SupportsCompute() const override
Whether the context backend supports ComputePass.
size_t GetMinimumUniformAlignment() const override
The minimum alignment of uniform value offsets in bytes.
bool SupportsSSBO() const override
Whether the context backend supports binding Shader Storage Buffer Objects (SSBOs) to pipelines.
bool SupportsDeviceTransientTextures() const override
Whether the context backend supports allocating StorageMode::kDeviceTransient (aka "memoryless") text...
bool SupportsImplicitResolvingMSAA() const override
Whether the context backend supports multisampled rendering to the on-screen surface without requirin...
bool SupportsPrimitiveRestart() const override
Whether primitive restart is supported.
PixelFormat GetDefaultColorFormat() const override
Returns a supported PixelFormat for textures that store 4-channel colors (red/green/blue/alpha).
bool SupportsExtendedRangeFormats() const override
Whether the XR formats are supported on this device.
bool SupportsTriangleFan() const override
Whether the primitive type TriangleFan is supported by the backend.
bool SupportsDecalSamplerAddressMode() const override
Whether the context backend supports SamplerAddressMode::Decal.
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...