mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-28 11:18:57 +02:00
[vk] Extended PixelFormat for Depth/Stencil
This commit is contained in:
parent
68d599e214
commit
829e58aa31
2 changed files with 11 additions and 1 deletions
|
|
@ -50,6 +50,7 @@ using VideoCore::Surface::HasAlpha;
|
|||
using VideoCore::Surface::IsPixelFormatASTC;
|
||||
using VideoCore::Surface::IsPixelFormatInteger;
|
||||
using VideoCore::Surface::SurfaceType;
|
||||
using VideoCore::Surface::PixelFormat;
|
||||
using VideoCore::Surface::PixelFormatNumeric;
|
||||
|
||||
namespace {
|
||||
|
|
@ -2445,7 +2446,10 @@ VkImageView ImageView::StencilView(Shader::TextureType texture_type) {
|
|||
if (view) {
|
||||
return *view;
|
||||
}
|
||||
const auto& info = MaxwellToVK::SurfaceFormat(*device, FormatType::Optimal, true, format);
|
||||
const auto surface_type = VideoCore::Surface::GetFormatType(format);
|
||||
const PixelFormat view_format =
|
||||
surface_type == SurfaceType::DepthStencil ? PixelFormat::S8_UINT : format;
|
||||
const auto& info = MaxwellToVK::SurfaceFormat(*device, FormatType::Optimal, true, view_format);
|
||||
view = MakeView(info.format, VK_IMAGE_ASPECT_STENCIL_BIT, texture_type);
|
||||
return *view;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue