mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-11-23 03:09:55 +00:00
image_view: Use array view for color/depth buffers with multiple layers. (#1556)
This commit is contained in:
parent
b41664ac61
commit
e585330744
@ -131,6 +131,7 @@ ImageViewInfo::ImageViewInfo(const AmdGpu::Liverpool::ColorBuffer& col_buffer,
|
|||||||
Vulkan::LiverpoolToVK::SurfaceFormat(col_buffer.info.format, col_buffer.NumFormat());
|
Vulkan::LiverpoolToVK::SurfaceFormat(col_buffer.info.format, col_buffer.NumFormat());
|
||||||
range.base.layer = col_buffer.view.slice_start;
|
range.base.layer = col_buffer.view.slice_start;
|
||||||
range.extent.layers = col_buffer.NumSlices() - range.base.layer;
|
range.extent.layers = col_buffer.NumSlices() - range.base.layer;
|
||||||
|
type = range.extent.layers > 1 ? vk::ImageViewType::e2DArray : vk::ImageViewType::e2D;
|
||||||
format = Vulkan::LiverpoolToVK::AdjustColorBufferFormat(
|
format = Vulkan::LiverpoolToVK::AdjustColorBufferFormat(
|
||||||
base_format, col_buffer.info.comp_swap.Value(), is_vo_surface);
|
base_format, col_buffer.info.comp_swap.Value(), is_vo_surface);
|
||||||
}
|
}
|
||||||
@ -143,6 +144,7 @@ ImageViewInfo::ImageViewInfo(const AmdGpu::Liverpool::DepthBuffer& depth_buffer,
|
|||||||
is_storage = ctl.depth_write_enable;
|
is_storage = ctl.depth_write_enable;
|
||||||
range.base.layer = view.slice_start;
|
range.base.layer = view.slice_start;
|
||||||
range.extent.layers = view.NumSlices() - range.base.layer;
|
range.extent.layers = view.NumSlices() - range.base.layer;
|
||||||
|
type = range.extent.layers > 1 ? vk::ImageViewType::e2DArray : vk::ImageViewType::e2D;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageView::ImageView(const Vulkan::Instance& instance, const ImageViewInfo& info_, Image& image,
|
ImageView::ImageView(const Vulkan::Instance& instance, const ImageViewInfo& info_, Image& image,
|
||||||
|
Loading…
Reference in New Issue
Block a user