mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-29 13:56:17 +00:00
video_core: improve image cube heuristic
This commit is contained in:
parent
4fb2247196
commit
0b672a08ac
1 changed files with 4 additions and 3 deletions
|
@ -151,9 +151,10 @@ Image::Image(const Vulkan::Instance& instance_, Vulkan::Scheduler& scheduler_,
|
||||||
// the texture cache should re-create the resource with the usage requested
|
// the texture cache should re-create the resource with the usage requested
|
||||||
vk::ImageCreateFlags flags{vk::ImageCreateFlagBits::eMutableFormat |
|
vk::ImageCreateFlags flags{vk::ImageCreateFlagBits::eMutableFormat |
|
||||||
vk::ImageCreateFlagBits::eExtendedUsage};
|
vk::ImageCreateFlagBits::eExtendedUsage};
|
||||||
const bool can_be_cube = (info.type == vk::ImageType::e2D) &&
|
const bool can_be_cube =
|
||||||
(info.resources.layers % 6 == 0) &&
|
(info.type == vk::ImageType::e2D) &&
|
||||||
(info.size.width == info.size.height);
|
(info.props.is_pow2 ? (info.resources.layers % 8) : (info.resources.layers % 6) == 0) &&
|
||||||
|
(info.size.width == info.size.height);
|
||||||
if (info.props.is_cube || can_be_cube) {
|
if (info.props.is_cube || can_be_cube) {
|
||||||
flags |= vk::ImageCreateFlagBits::eCubeCompatible;
|
flags |= vk::ImageCreateFlagBits::eCubeCompatible;
|
||||||
} else if (info.props.is_volume) {
|
} else if (info.props.is_volume) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue