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_;
106 return needs_partitioned_host_buffer_;
112 bool supports_texture_to_texture_blits,
113 bool supports_framebuffer_fetch,
114 bool supports_compute,
115 bool supports_compute_subgroups,
116 bool supports_read_from_resolve,
117 bool supports_decal_sampler_address_mode,
118 bool supports_device_transient_textures,
119 bool supports_triangle_fan,
120 bool supports_extended_range_formats,
125 ISize default_maximum_render_pass_attachment_size,
126 size_t minimum_uniform_alignment,
127 bool needs_partitioned_host_buffer)
128 : supports_offscreen_msaa_(supports_offscreen_msaa),
129 supports_ssbo_(supports_ssbo),
130 supports_texture_to_texture_blits_(supports_texture_to_texture_blits),
131 supports_framebuffer_fetch_(supports_framebuffer_fetch),
132 supports_compute_(supports_compute),
133 supports_compute_subgroups_(supports_compute_subgroups),
134 supports_read_from_resolve_(supports_read_from_resolve),
135 supports_decal_sampler_address_mode_(
136 supports_decal_sampler_address_mode),
137 supports_device_transient_textures_(supports_device_transient_textures),
138 supports_triangle_fan_(supports_triangle_fan),
139 supports_extended_range_formats_(supports_extended_range_formats),
140 needs_partitioned_host_buffer_(needs_partitioned_host_buffer),
141 default_color_format_(default_color_format),
142 default_stencil_format_(default_stencil_format),
143 default_depth_stencil_format_(default_depth_stencil_format),
144 default_glyph_atlas_format_(default_glyph_atlas_format),
145 default_maximum_render_pass_attachment_size_(
146 default_maximum_render_pass_attachment_size),
147 minimum_uniform_alignment_(minimum_uniform_alignment) {}
151 bool supports_offscreen_msaa_ =
false;
152 bool supports_ssbo_ =
false;
153 bool supports_texture_to_texture_blits_ =
false;
154 bool supports_framebuffer_fetch_ =
false;
155 bool supports_compute_ =
false;
156 bool supports_compute_subgroups_ =
false;
157 bool supports_read_from_resolve_ =
false;
158 bool supports_decal_sampler_address_mode_ =
false;
159 bool supports_device_transient_textures_ =
false;
160 bool supports_triangle_fan_ =
false;
161 bool supports_extended_range_formats_ =
false;
162 bool needs_partitioned_host_buffer_ =
false;
167 ISize default_maximum_render_pass_attachment_size_ =
ISize(1, 1);
168 size_t minimum_uniform_alignment_ = 256;
180 supports_offscreen_msaa_ =
value;
185 supports_ssbo_ =
value;
191 supports_texture_to_texture_blits_ =
value;
197 supports_framebuffer_fetch_ =
value;
202 supports_compute_ =
value;
208 supports_compute_subgroups_ =
value;
214 default_color_format_ =
value;
220 default_stencil_format_ =
value;
226 default_depth_stencil_format_ =
value;
231 bool read_from_resolve) {
232 supports_read_from_resolve_ = read_from_resolve;
238 supports_decal_sampler_address_mode_ =
value;
244 supports_device_transient_textures_ =
value;
250 default_glyph_atlas_format_ =
value;
255 supports_triangle_fan_ =
value;
261 default_maximum_render_pass_attachment_size_ = size;
267 supports_extended_range_formats_ =
value;
273 minimum_uniform_alignment_ =
value;
279 needs_partitioned_host_buffer_ =
value;
286 supports_offscreen_msaa_,
288 supports_texture_to_texture_blits_,
289 supports_framebuffer_fetch_,
291 supports_compute_subgroups_,
292 supports_read_from_resolve_,
293 supports_decal_sampler_address_mode_,
294 supports_device_transient_textures_,
295 supports_triangle_fan_,
296 supports_extended_range_formats_,
301 default_maximum_render_pass_attachment_size_.value_or(
ISize{1, 1}),
302 minimum_uniform_alignment_,
303 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)
~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,...