mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-26 03:55:37 +00:00
tile_manager: Bump max supported mips to 16
Fixes a crash during start
This commit is contained in:
parent
a7f91d8ff5
commit
a82f3cec4b
@ -16,7 +16,7 @@ layout(push_constant) uniform image_info {
|
|||||||
uint num_levels;
|
uint num_levels;
|
||||||
uint pitch;
|
uint pitch;
|
||||||
uint height;
|
uint height;
|
||||||
uint sizes[14];
|
uint sizes[16];
|
||||||
} info;
|
} info;
|
||||||
|
|
||||||
// Inverse morton LUT, small enough to fit into K$
|
// Inverse morton LUT, small enough to fit into K$
|
||||||
|
@ -18,7 +18,7 @@ layout(push_constant) uniform image_info {
|
|||||||
uint num_levels;
|
uint num_levels;
|
||||||
uint pitch;
|
uint pitch;
|
||||||
uint height;
|
uint height;
|
||||||
uint sizes[14];
|
uint sizes[16];
|
||||||
} info;
|
} info;
|
||||||
|
|
||||||
#define MICRO_TILE_DIM 8
|
#define MICRO_TILE_DIM 8
|
||||||
|
@ -16,7 +16,7 @@ layout(push_constant) uniform image_info {
|
|||||||
uint num_levels;
|
uint num_levels;
|
||||||
uint pitch;
|
uint pitch;
|
||||||
uint height;
|
uint height;
|
||||||
uint sizes[14];
|
uint sizes[16];
|
||||||
} info;
|
} info;
|
||||||
|
|
||||||
// Inverse morton LUT, small enough to fit into K$
|
// Inverse morton LUT, small enough to fit into K$
|
||||||
|
@ -16,7 +16,7 @@ layout(push_constant) uniform image_info {
|
|||||||
uint num_levels;
|
uint num_levels;
|
||||||
uint pitch;
|
uint pitch;
|
||||||
uint height;
|
uint height;
|
||||||
uint sizes[14];
|
uint sizes[16];
|
||||||
} info;
|
} info;
|
||||||
|
|
||||||
// Inverse morton LUT, small enough to fit into K$
|
// Inverse morton LUT, small enough to fit into K$
|
||||||
|
@ -19,7 +19,7 @@ layout(push_constant) uniform image_info {
|
|||||||
uint num_levels;
|
uint num_levels;
|
||||||
uint pitch;
|
uint pitch;
|
||||||
uint height;
|
uint height;
|
||||||
uint sizes[14];
|
uint sizes[16];
|
||||||
} info;
|
} info;
|
||||||
|
|
||||||
#define MICRO_TILE_DIM 8
|
#define MICRO_TILE_DIM 8
|
||||||
|
@ -70,7 +70,7 @@ struct DetilerParams {
|
|||||||
u32 num_levels;
|
u32 num_levels;
|
||||||
u32 pitch0;
|
u32 pitch0;
|
||||||
u32 height;
|
u32 height;
|
||||||
u32 sizes[14];
|
std::array<u32, 16> sizes;
|
||||||
};
|
};
|
||||||
|
|
||||||
TileManager::TileManager(const Vulkan::Instance& instance, Vulkan::Scheduler& scheduler)
|
TileManager::TileManager(const Vulkan::Instance& instance, Vulkan::Scheduler& scheduler)
|
||||||
@ -275,7 +275,7 @@ std::pair<vk::Buffer, u32> TileManager::TryDetile(vk::Buffer in_buffer, u32 in_o
|
|||||||
params.sizes[0] = tiles_per_row;
|
params.sizes[0] = tiles_per_row;
|
||||||
params.sizes[1] = tiles_per_slice;
|
params.sizes[1] = tiles_per_slice;
|
||||||
} else {
|
} else {
|
||||||
ASSERT(info.resources.levels <= 14);
|
ASSERT(info.resources.levels <= params.sizes.size());
|
||||||
std::memset(¶ms.sizes, 0, sizeof(params.sizes));
|
std::memset(¶ms.sizes, 0, sizeof(params.sizes));
|
||||||
for (int m = 0; m < info.resources.levels; ++m) {
|
for (int m = 0; m < info.resources.levels; ++m) {
|
||||||
params.sizes[m] = info.mips_layout[m].size + (m > 0 ? params.sizes[m - 1] : 0);
|
params.sizes[m] = info.mips_layout[m].size + (m > 0 ? params.sizes[m - 1] : 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user