|
|
@ -48,6 +48,7 @@ using VideoCore::Surface::HasAlpha; |
|
|
using VideoCore::Surface::IsPixelFormatASTC; |
|
|
using VideoCore::Surface::IsPixelFormatASTC; |
|
|
using VideoCore::Surface::IsPixelFormatInteger; |
|
|
using VideoCore::Surface::IsPixelFormatInteger; |
|
|
using VideoCore::Surface::SurfaceType; |
|
|
using VideoCore::Surface::SurfaceType; |
|
|
|
|
|
using VideoCore::Surface::PixelFormat; |
|
|
using VideoCore::Surface::PixelFormatNumeric; |
|
|
using VideoCore::Surface::PixelFormatNumeric; |
|
|
|
|
|
|
|
|
namespace { |
|
|
namespace { |
|
|
@ -2362,7 +2363,10 @@ VkImageView ImageView::StencilView(Shader::TextureType texture_type) { |
|
|
if (view) { |
|
|
if (view) { |
|
|
return *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); |
|
|
view = MakeView(info.format, VK_IMAGE_ASPECT_STENCIL_BIT, texture_type); |
|
|
return *view; |
|
|
return *view; |
|
|
} |
|
|
} |
|
|
|