mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-22 04:24:44 +00:00
Promote textures to depth if they use depth tiling
This commit is contained in:
parent
40c9b2addb
commit
266cca5654
4 changed files with 2 additions and 4 deletions
|
@ -448,7 +448,6 @@ void GraphicsPipeline::BindResources(const Liverpool::Regs& regs,
|
|||
const auto tsharp = image_desc.GetSharp(*stage);
|
||||
if (tsharp) {
|
||||
tsharps.emplace_back(tsharp);
|
||||
VideoCore::ImageInfo image_info{tsharp};
|
||||
VideoCore::ImageInfo image_info{tsharp, image_desc.is_depth};
|
||||
VideoCore::ImageViewInfo view_info{tsharp, image_desc.is_storage};
|
||||
const auto& image_view = texture_cache.FindTexture(image_info, view_info);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
// Copyright © 2023 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||
// Copyright © 2015-2023 The Khronos Group Inc.
|
||||
// Copyright © 2015-2023 Valve Corporation
|
||||
|
|
|
@ -204,7 +204,7 @@ ImageInfo::ImageInfo(const AmdGpu::Image& image, bool force_depth /*= false*/) n
|
|||
tiling_mode = image.GetTilingMode();
|
||||
pixel_format = LiverpoolToVK::SurfaceFormat(image.GetDataFmt(), image.GetNumberFmt());
|
||||
// Override format if image is forced to be a depth target
|
||||
if (force_depth) {
|
||||
if (force_depth || tiling_mode == AmdGpu::TilingMode::Depth_MacroTiled) {
|
||||
if (pixel_format == vk::Format::eR32Sfloat) {
|
||||
pixel_format = vk::Format::eD32SfloatS8Uint;
|
||||
} else if (pixel_format == vk::Format::eR16Sfloat) {
|
||||
|
|
|
@ -209,7 +209,6 @@ ImageId TextureCache::FindImage(const ImageInfo& info) {
|
|||
cache_image.info.size == info.size) {
|
||||
|
||||
ASSERT(cache_image.info.type == info.type);
|
||||
ASSERT(cache_image.info.num_bits == info.num_bits);
|
||||
if (IsVulkanFormatCompatible((VkFormat)info.pixel_format,
|
||||
(VkFormat)cache_image.info.pixel_format)) {
|
||||
image_id = cache_id;
|
||||
|
|
Loading…
Add table
Reference in a new issue