logo
pub enum CopyError {
Show 36 variants SyncCommandBufferBuilderError(SyncCommandBufferBuilderError), RequirementNotMet { required_for: &'static str, requires_one_of: RequiresOneOf, }, ForbiddenInsideRenderPass, NotSupportedByQueueFamily, ArrayLayerCountMismatch { region_index: usize, src_layer_count: u32, dst_layer_count: u32, }, ArrayLayersOutOfRange { resource: CopyErrorResource, region_index: usize, array_layers_range_end: u32, image_array_layers: u32, }, AspectsMismatch { region_index: usize, src_aspects: ImageAspects, dst_aspects: ImageAspects, }, AspectsNotAllowed { resource: CopyErrorResource, region_index: usize, aspects: ImageAspects, allowed_aspects: ImageAspects, }, BufferImageHeightNotAligned { resource: CopyErrorResource, region_index: usize, image_height: u32, required_alignment: u32, }, BufferImageHeightTooSmall { resource: CopyErrorResource, region_index: usize, image_height: u32, min: u32, }, BufferRowLengthNotAligned { resource: CopyErrorResource, region_index: usize, row_length: u32, required_alignment: u32, }, BufferRowLengthTooLarge { resource: CopyErrorResource, region_index: usize, buffer_row_length: u32, }, BufferRowLengthTooSmall { resource: CopyErrorResource, region_index: usize, row_length: u32, min: u32, }, DataTooLarge { size: DeviceSize, max: DeviceSize, }, DepthStencilNotSupportedByQueueFamily, ExtentNotAlignedForImage { resource: CopyErrorResource, region_index: usize, extent: [u32; 3], required_alignment: [u32; 3], }, FilterNotSupportedForImageType, FilterNotSupportedByFormat, FormatNotSupported { resource: CopyErrorResource, format: Format, }, FormatsMismatch { src_format: Format, dst_format: Format, }, FormatsNotCompatible { src_format: Format, dst_format: Format, }, ImageLayoutInvalid { resource: CopyErrorResource, image_layout: ImageLayout, }, MipLevelsOutOfRange { resource: CopyErrorResource, region_index: usize, mip_levels_range_end: u32, image_mip_levels: u32, }, MissingFormatFeature { resource: CopyErrorResource, format_feature: &'static str, }, MissingUsage { resource: CopyErrorResource, usage: &'static str, }, MultipleAspectsNotAllowed { resource: CopyErrorResource, region_index: usize, aspects: ImageAspects, }, OffsetNotAlignedForBuffer { resource: CopyErrorResource, region_index: usize, offset: DeviceSize, required_alignment: DeviceSize, }, OffsetNotAlignedForImage { resource: CopyErrorResource, region_index: usize, offset: [u32; 3], required_alignment: [u32; 3], }, OffsetsInvalidForImageType { resource: CopyErrorResource, region_index: usize, offsets: [u32; 2], }, OverlappingRegions { src_region_index: usize, dst_region_index: usize, }, OverlappingSubresourcesLayoutMismatch { src_region_index: usize, dst_region_index: usize, src_image_layout: ImageLayout, dst_image_layout: ImageLayout, }, RegionOutOfBufferBounds { resource: CopyErrorResource, region_index: usize, offset_range_end: DeviceSize, buffer_size: DeviceSize, }, RegionOutOfImageBounds { resource: CopyErrorResource, region_index: usize, offset_range_end: [u32; 3], subresource_extent: [u32; 3], }, SampleCountInvalid { resource: CopyErrorResource, sample_count: SampleCount, allowed_sample_counts: SampleCounts, }, SampleCountMismatch { src_sample_count: SampleCount, dst_sample_count: SampleCount, }, SizeNotAlignedForBuffer { resource: CopyErrorResource, region_index: usize, size: DeviceSize, required_alignment: DeviceSize, },
}
Expand description

Error that can happen when recording a copy command.

Variants

SyncCommandBufferBuilderError(SyncCommandBufferBuilderError)

RequirementNotMet

Fields

required_for: &'static str
requires_one_of: RequiresOneOf

ForbiddenInsideRenderPass

Operation forbidden inside of a render pass.

NotSupportedByQueueFamily

The queue family doesn’t allow this operation.

ArrayLayerCountMismatch

Fields

region_index: usize
src_layer_count: u32
dst_layer_count: u32

The array layer counts of the source and destination subresource ranges of a region do not match.

ArrayLayersOutOfRange

Fields

region_index: usize
array_layers_range_end: u32
image_array_layers: u32

The end of the range of accessed array layers of the subresource range of a region is greater than the number of array layers in the image.

AspectsMismatch

Fields

region_index: usize
src_aspects: ImageAspects
dst_aspects: ImageAspects

The aspects of the source and destination subresource ranges of a region do not match.

AspectsNotAllowed

Fields

region_index: usize
aspects: ImageAspects
allowed_aspects: ImageAspects

The aspects of the subresource range of a region contain aspects that are not present in the image, or that are not allowed.

BufferImageHeightNotAligned

Fields

region_index: usize
image_height: u32
required_alignment: u32

The buffer image height of a region is not a multiple of the required buffer alignment.

BufferImageHeightTooSmall

Fields

region_index: usize
image_height: u32
min: u32

The buffer image height of a region is smaller than the image extent height.

BufferRowLengthNotAligned

Fields

region_index: usize
row_length: u32
required_alignment: u32

The buffer row length of a region is not a multiple of the required buffer alignment.

BufferRowLengthTooLarge

Fields

region_index: usize
buffer_row_length: u32

The buffer row length of a region specifies a row of texels that is greater than 0x7FFFFFFF bytes in size.

BufferRowLengthTooSmall

Fields

region_index: usize
row_length: u32
min: u32

The buffer row length of a region is smaller than the image extent width.

DataTooLarge

Fields

size: DeviceSize

The provided data has a size larger than the maximum allowed.

DepthStencilNotSupportedByQueueFamily

Depth/stencil images are not supported by the queue family of this command buffer; a graphics queue family is required.

ExtentNotAlignedForImage

Fields

region_index: usize
extent: [u32; 3]
required_alignment: [u32; 3]

The image extent of a region is not a multiple of the required image alignment.

FilterNotSupportedForImageType

The chosen filter type does not support the dimensionality of the source image.

FilterNotSupportedByFormat

The chosen filter type does not support the format of the source image.

FormatNotSupported

Fields

format: Format

The format of an image is not supported for this operation.

FormatsMismatch

Fields

src_format: Format
dst_format: Format

The format of the source image does not match the format of the destination image.

FormatsNotCompatible

Fields

src_format: Format
dst_format: Format

The format of the source image subresource is not compatible with the format of the destination image subresource.

ImageLayoutInvalid

Fields

image_layout: ImageLayout

A specified image layout is not valid for this operation.

MipLevelsOutOfRange

Fields

region_index: usize
mip_levels_range_end: u32
image_mip_levels: u32

The end of the range of accessed mip levels of the subresource range of a region is greater than the number of mip levels in the image.

MissingFormatFeature

Fields

format_feature: &'static str

An image does not have a required format feature.

MissingUsage

Fields

usage: &'static str

A resource did not have a required usage enabled.

MultipleAspectsNotAllowed

Fields

region_index: usize
aspects: ImageAspects

A subresource range of a region specifies multiple aspects, but only one aspect can be selected for the image.

OffsetNotAlignedForBuffer

Fields

region_index: usize
offset: DeviceSize
required_alignment: DeviceSize

The buffer offset of a region is not a multiple of the required buffer alignment.

OffsetNotAlignedForImage

Fields

region_index: usize
offset: [u32; 3]
required_alignment: [u32; 3]

The image offset of a region is not a multiple of the required image alignment.

OffsetsInvalidForImageType

Fields

region_index: usize
offsets: [u32; 2]

The image offsets of a region are not the values required for that axis ([0, 1]) for the type of the image.

OverlappingRegions

Fields

src_region_index: usize
dst_region_index: usize

The source bounds of a region overlap with the destination bounds of a region.

OverlappingSubresourcesLayoutMismatch

Fields

src_region_index: usize
dst_region_index: usize
src_image_layout: ImageLayout
dst_image_layout: ImageLayout

The source subresources of a region overlap with the destination subresources of a region, but the source image layout does not equal the destination image layout.

RegionOutOfBufferBounds

Fields

region_index: usize
offset_range_end: DeviceSize
buffer_size: DeviceSize

The end of the range of accessed byte offsets of a region is greater than the size of the buffer.

RegionOutOfImageBounds

Fields

region_index: usize
offset_range_end: [u32; 3]
subresource_extent: [u32; 3]

The end of the range of accessed texel offsets of a region is greater than the extent of the selected subresource of the image.

SampleCountInvalid

Fields

sample_count: SampleCount
allowed_sample_counts: SampleCounts

An image has a sample count that is not valid for this operation.

SampleCountMismatch

Fields

src_sample_count: SampleCount
dst_sample_count: SampleCount

The source image has a different sample count than the destination image.

SizeNotAlignedForBuffer

Fields

region_index: usize
size: DeviceSize
required_alignment: DeviceSize

The buffer size of a region is not a multiple of the required buffer alignment.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0:

use the Display impl or to_string()

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.