mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-28 14:23:18 +00:00
texture_cache: Fix image mip overlap. (#2177)
This commit is contained in:
parent
12364b197a
commit
d361579618
3 changed files with 7 additions and 6 deletions
|
@ -802,8 +802,6 @@ void Rasterizer::BeginRendering(const GraphicsPipeline& pipeline, RenderState& s
|
||||||
const auto mip = view.info.range.base.level;
|
const auto mip = view.info.range.base.level;
|
||||||
state.width = std::min<u32>(state.width, std::max(image.info.size.width >> mip, 1u));
|
state.width = std::min<u32>(state.width, std::max(image.info.size.width >> mip, 1u));
|
||||||
state.height = std::min<u32>(state.height, std::max(image.info.size.height >> mip, 1u));
|
state.height = std::min<u32>(state.height, std::max(image.info.size.height >> mip, 1u));
|
||||||
ASSERT(old_img.info.size.width == state.width);
|
|
||||||
ASSERT(old_img.info.size.height == state.height);
|
|
||||||
}
|
}
|
||||||
auto& image = texture_cache.GetImage(image_id);
|
auto& image = texture_cache.GetImage(image_id);
|
||||||
if (image.binding.force_general) {
|
if (image.binding.force_general) {
|
||||||
|
|
|
@ -219,7 +219,7 @@ int ImageInfo::IsMipOf(const ImageInfo& info) const {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsTilingCompatible(info.tiling_idx, tiling_idx)) {
|
if (!IsTilingCompatible(info.tiling_idx, tiling_idx)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -114,9 +114,12 @@ ImageView::ImageView(const Vulkan::Instance& instance, const ImageViewInfo& info
|
||||||
const auto view_aspect = aspect & vk::ImageAspectFlagBits::eDepth ? "Depth"
|
const auto view_aspect = aspect & vk::ImageAspectFlagBits::eDepth ? "Depth"
|
||||||
: aspect & vk::ImageAspectFlagBits::eStencil ? "Stencil"
|
: aspect & vk::ImageAspectFlagBits::eStencil ? "Stencil"
|
||||||
: "Color";
|
: "Color";
|
||||||
Vulkan::SetObjectName(instance.GetDevice(), *image_view, "ImageView {}x{}x{} {:#x}:{:#x} ({})",
|
Vulkan::SetObjectName(
|
||||||
image.info.size.width, image.info.size.height, image.info.size.depth,
|
instance.GetDevice(), *image_view, "ImageView {}x{}x{} {:#x}:{:#x} {}:{} {}:{} ({})",
|
||||||
image.info.guest_address, image.info.guest_size, view_aspect);
|
image.info.size.width, image.info.size.height, image.info.size.depth,
|
||||||
|
image.info.guest_address, image.info.guest_size, info.range.base.level,
|
||||||
|
info.range.base.level + info.range.extent.levels - 1, info.range.base.layer,
|
||||||
|
info.range.base.layer + info.range.extent.layers - 1, view_aspect);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageView::~ImageView() = default;
|
ImageView::~ImageView() = default;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue