mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-06 08:08:42 +00:00
texture_cache: 3d texture layers count fixup
This commit is contained in:
parent
d0e6ce6918
commit
0bf3678b6d
1 changed files with 4 additions and 0 deletions
|
@ -79,6 +79,10 @@ ImageViewInfo::ImageViewInfo(const AmdGpu::Image& image, bool is_storage_) noexc
|
||||||
range.base.layer = image.base_array;
|
range.base.layer = image.base_array;
|
||||||
range.extent.levels = image.last_level + 1;
|
range.extent.levels = image.last_level + 1;
|
||||||
range.extent.layers = image.last_array + 1;
|
range.extent.layers = image.last_array + 1;
|
||||||
|
if (type == vk::ImageViewType::e3D && range.extent.layers > 1) {
|
||||||
|
// Some games pass incorrect layer count for 3D textures so we need to fixup it
|
||||||
|
range.extent.layers = 1;
|
||||||
|
}
|
||||||
if (!is_storage) {
|
if (!is_storage) {
|
||||||
mapping.r = ConvertComponentSwizzle(image.dst_sel_x);
|
mapping.r = ConvertComponentSwizzle(image.dst_sel_x);
|
||||||
mapping.g = ConvertComponentSwizzle(image.dst_sel_y);
|
mapping.g = ConvertComponentSwizzle(image.dst_sel_y);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue