mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 13:48:40 +00:00
vulkan: Handle incompatible depth format using null binding. (#2892)
Co-authored-by: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com>
This commit is contained in:
@@ -281,6 +281,11 @@ constexpr AmdGpu::Image ImageResource::GetSharp(const Info& info) const noexcept
|
||||
// Fall back to null image if unbound.
|
||||
return AmdGpu::Image::Null();
|
||||
}
|
||||
const auto data_fmt = image.GetDataFmt();
|
||||
if (is_depth && data_fmt != AmdGpu::DataFormat::Format16 &&
|
||||
data_fmt != AmdGpu::DataFormat::Format32) {
|
||||
return AmdGpu::Image::NullDepth();
|
||||
}
|
||||
return image;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user