mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-23 15:24:25 +00:00
Merge pull request #246 from lummax/swapchainimage-clear-value
image/swapchain: Implement ImageClearValue for SwapchainImage
This commit is contained in:
commit
29c50f2261
@ -15,12 +15,15 @@ use std::sync::Weak;
|
||||
|
||||
use command_buffer::Submission;
|
||||
use device::Queue;
|
||||
use format::ClearValue;
|
||||
use format::Format;
|
||||
use format::FormatDesc;
|
||||
use image::traits::AccessRange;
|
||||
use image::traits::CommandBufferState;
|
||||
use image::traits::CommandListState;
|
||||
use image::traits::GpuAccessResult;
|
||||
use image::traits::Image;
|
||||
use image::traits::ImageClearValue;
|
||||
use image::traits::ImageContent;
|
||||
use image::traits::ImageView;
|
||||
use image::traits::PipelineBarrierRequest;
|
||||
@ -194,6 +197,14 @@ unsafe impl Image for SwapchainImage {
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl ImageClearValue<<Format as FormatDesc>::ClearValue> for SwapchainImage
|
||||
{
|
||||
#[inline]
|
||||
fn decode(&self, value: <Format as FormatDesc>::ClearValue) -> Option<ClearValue> {
|
||||
Some(self.format.decode_clear_value(value))
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl<P> ImageContent<P> for SwapchainImage {
|
||||
#[inline]
|
||||
fn matches_format(&self) -> bool {
|
||||
|
Loading…
Reference in New Issue
Block a user