mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-27 17:58:59 +02:00
[vk] Remove forced stencil format handling in TextureCacheRuntime
This commit is contained in:
parent
2af8440867
commit
5eb8f62744
2 changed files with 2 additions and 15 deletions
|
|
@ -911,15 +911,6 @@ TextureCacheRuntime::TextureCacheRuntime(const Device& device_, Scheduler& sched
|
|||
view_formats[index_a].push_back(view_info.format);
|
||||
}
|
||||
}
|
||||
if (VideoCore::Surface::GetFormatType(image_format) ==
|
||||
VideoCore::Surface::SurfaceType::DepthStencil) {
|
||||
const auto stencil_info = MaxwellToVK::SurfaceFormat(
|
||||
device, FormatType::Optimal, true, PixelFormat::S8_UINT);
|
||||
auto& formats = view_formats[index_a];
|
||||
if (std::ranges::find(formats, stencil_info.format) == formats.end()) {
|
||||
formats.push_back(stencil_info.format);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Settings::values.gpu_unswizzle_enabled.GetValue()) {
|
||||
|
|
@ -2297,12 +2288,7 @@ VkImageView ImageView::StencilView() {
|
|||
if (stencil_view) {
|
||||
return *stencil_view;
|
||||
}
|
||||
PixelFormat view_format = format;
|
||||
if (VideoCore::Surface::GetFormatType(format) ==
|
||||
VideoCore::Surface::SurfaceType::DepthStencil) {
|
||||
view_format = PixelFormat::S8_UINT;
|
||||
}
|
||||
const auto& info = MaxwellToVK::SurfaceFormat(*device, FormatType::Optimal, true, view_format);
|
||||
const auto& info = MaxwellToVK::SurfaceFormat(*device, FormatType::Optimal, true, format);
|
||||
stencil_view = MakeView(info.format, VK_IMAGE_ASPECT_STENCIL_BIT);
|
||||
return *stencil_view;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2727,6 +2727,7 @@ void TextureCache<P>::SynchronizeAliases(ImageId image_id) {
|
|||
template <class P>
|
||||
void TextureCache<P>::PrepareImage(ImageId image_id, bool is_modification, bool invalidate) {
|
||||
Image& image = slot_images[image_id];
|
||||
runtime.TransitionImageLayout(image);
|
||||
if (invalidate) {
|
||||
image.flags &= ~(ImageFlagBits::CpuModified | ImageFlagBits::GpuModified);
|
||||
if (False(image.flags & ImageFlagBits::Tracked)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue