25 return supports_offscreen_msaa_;
36 return supports_texture_to_texture_blits_;
41 return supports_framebuffer_fetch_;
49 return supports_compute_subgroups_;
54 return supports_read_from_resolve_;
59 return supports_decal_sampler_address_mode_;
67 return default_color_format_;
72 return default_stencil_format_;
77 return default_depth_stencil_format_;
82 return supports_device_transient_textures_;
87 return default_glyph_atlas_format_;
92 return default_maximum_render_pass_attachment_size_;
100 return supports_extended_range_formats_;
105 return minimum_uniform_alignment_;
110 return needs_partitioned_host_buffer_;
116 bool supports_texture_to_texture_blits,
117 bool supports_framebuffer_fetch,
118 bool supports_compute,
119 bool supports_compute_subgroups,
120 bool supports_read_from_resolve,
121 bool supports_decal_sampler_address_mode,
122 bool supports_device_transient_textures,
123 bool supports_triangle_fan,
124 bool supports_extended_range_formats,
129 ISize default_maximum_render_pass_attachment_size,
130 size_t minimum_uniform_alignment,
131 bool needs_partitioned_host_buffer)
132 : supports_offscreen_msaa_(supports_offscreen_msaa),
133 supports_ssbo_(supports_ssbo),
134 supports_texture_to_texture_blits_(supports_texture_to_texture_blits),
135 supports_framebuffer_fetch_(supports_framebuffer_fetch),
136 supports_compute_(supports_compute),
137 supports_compute_subgroups_(supports_compute_subgroups),
138 supports_read_from_resolve_(supports_read_from_resolve),
139 supports_decal_sampler_address_mode_(
140 supports_decal_sampler_address_mode),
141 supports_device_transient_textures_(supports_device_transient_textures),
142 supports_triangle_fan_(supports_triangle_fan),
143 supports_extended_range_formats_(supports_extended_range_formats),
144 needs_partitioned_host_buffer_(needs_partitioned_host_buffer),
145 default_color_format_(default_color_format),
146 default_stencil_format_(default_stencil_format),
147 default_depth_stencil_format_(default_depth_stencil_format),
148 default_glyph_atlas_format_(default_glyph_atlas_format),
149 default_maximum_render_pass_attachment_size_(
150 default_maximum_render_pass_attachment_size),
151 minimum_uniform_alignment_(minimum_uniform_alignment) {}
155 bool supports_offscreen_msaa_ =
false;
156 bool supports_ssbo_ =
false;
157 bool supports_texture_to_texture_blits_ =
false;
158 bool supports_framebuffer_fetch_ =
false;
159 bool supports_compute_ =
false;
160 bool supports_compute_subgroups_ =
false;
161 bool supports_read_from_resolve_ =
false;
162 bool supports_decal_sampler_address_mode_ =
false;
163 bool supports_device_transient_textures_ =
false;
164 bool supports_triangle_fan_ =
false;
165 bool supports_extended_range_formats_ =
false;
166 bool needs_partitioned_host_buffer_ =
false;
171 ISize default_maximum_render_pass_attachment_size_ =
ISize(1, 1);
172 size_t minimum_uniform_alignment_ = 256;
184 supports_offscreen_msaa_ =
value;
189 supports_ssbo_ =
value;
195 supports_texture_to_texture_blits_ =
value;
201 supports_framebuffer_fetch_ =
value;
206 supports_compute_ =
value;
212 supports_compute_subgroups_ =
value;
218 default_color_format_ =
value;
224 default_stencil_format_ =
value;
230 default_depth_stencil_format_ =
value;
235 bool read_from_resolve) {
236 supports_read_from_resolve_ = read_from_resolve;
242 supports_decal_sampler_address_mode_ =
value;
248 supports_device_transient_textures_ =
value;
254 default_glyph_atlas_format_ =
value;
259 supports_triangle_fan_ =
value;
265 default_maximum_render_pass_attachment_size_ = size;
271 supports_extended_range_formats_ =
value;
277 minimum_uniform_alignment_ =
value;
283 needs_partitioned_host_buffer_ =
value;
290 supports_offscreen_msaa_,
292 supports_texture_to_texture_blits_,
293 supports_framebuffer_fetch_,
295 supports_compute_subgroups_,
296 supports_read_from_resolve_,
297 supports_decal_sampler_address_mode_,
298 supports_device_transient_textures_,
299 supports_triangle_fan_,
300 supports_extended_range_formats_,
305 default_maximum_render_pass_attachment_size_.value_or(
ISize{1, 1}),
306 minimum_uniform_alignment_,
307 needs_partitioned_host_buffer_
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 & SetNeedsPartitionedHostBuffer(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)
virtual size_t GetMinimumUniformAlignment() const =0
The minimum alignment of uniform value offsets in bytes.
virtual size_t GetMinimumStorageBufferAlignment() const
The minimum alignment of storage buffer value offsets in bytes.
~StandardCapabilities() override=default
bool SupportsReadFromResolve() const override
Whether the context backend supports binding the current RenderPass attachments. This is supported if...
bool NeedsPartitionedHostBuffer() const override
Whether the host buffer should use separate device buffers for indexes from other data.
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,...