mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +00:00
vk: Silence compiler warnings
This commit is contained in:
parent
dca3d477c9
commit
51f9310b9f
@ -467,9 +467,9 @@ namespace vk
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<vk::viewable_image> texture_cache::find_cached_image(VkFormat format, u16 w, u16 h, u16 d, u8 mipmaps, VkFlags flags)
|
std::unique_ptr<vk::viewable_image> texture_cache::find_cached_image(VkFormat format, u16 w, u16 h, u16 d, u16 mipmaps, VkFlags flags)
|
||||||
{
|
{
|
||||||
auto hash_properties = [](VkFormat format, u16 w, u16 h, u16 d, u8 mipmaps, VkFlags flags)
|
auto hash_properties = [](VkFormat format, u16 w, u16 h, u16 d, u16 mipmaps, VkFlags flags)
|
||||||
{
|
{
|
||||||
ensure(static_cast<u32>(format) < 0xFF);
|
ensure(static_cast<u32>(format) < 0xFF);
|
||||||
return (static_cast<u64>(format) & 0xFF) |
|
return (static_cast<u64>(format) & 0xFF) |
|
||||||
@ -1286,7 +1286,7 @@ namespace vk
|
|||||||
vk::change_image_layout(cmd, image.get(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL);
|
vk::change_image_layout(cmd, image.get(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL);
|
||||||
|
|
||||||
auto result = image.get();
|
auto result = image.get();
|
||||||
const u32 resource_memory = image->memory->size();
|
const auto resource_memory = image->memory->size();
|
||||||
auto disposable = std::unique_ptr<vk::disposable_t>(new cached_image_reference_t(this, image));
|
auto disposable = std::unique_ptr<vk::disposable_t>(new cached_image_reference_t(this, image));
|
||||||
vk::get_resource_manager()->dispose(disposable);
|
vk::get_resource_manager()->dispose(disposable);
|
||||||
|
|
||||||
@ -1316,8 +1316,9 @@ namespace vk
|
|||||||
return baseclass::get_unreleased_textures_count() + ::size32(m_cached_images);
|
return baseclass::get_unreleased_textures_count() + ::size32(m_cached_images);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 texture_cache::get_temporary_memory_in_use() const
|
u64 texture_cache::get_temporary_memory_in_use() const
|
||||||
{
|
{
|
||||||
|
// TODO: Technically incorrect, we should have separate metrics for cached evictable resources (this value) and temporary active resources.
|
||||||
return m_cached_memory_size;
|
return m_cached_memory_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -385,7 +385,7 @@ namespace vk
|
|||||||
//Stuff that has been dereferenced goes into these
|
//Stuff that has been dereferenced goes into these
|
||||||
const u32 max_cached_image_pool_size = 256;
|
const u32 max_cached_image_pool_size = 256;
|
||||||
std::deque<std::unique_ptr<vk::viewable_image>> m_cached_images;
|
std::deque<std::unique_ptr<vk::viewable_image>> m_cached_images;
|
||||||
atomic_t<u32> m_cached_memory_size = { 0 };
|
atomic_t<u64> m_cached_memory_size = { 0 };
|
||||||
shared_mutex m_cached_pool_lock;
|
shared_mutex m_cached_pool_lock;
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
@ -396,7 +396,7 @@ namespace vk
|
|||||||
|
|
||||||
vk::image* get_template_from_collection_impl(const std::vector<copy_region_descriptor>& sections_to_transfer) const;
|
vk::image* get_template_from_collection_impl(const std::vector<copy_region_descriptor>& sections_to_transfer) const;
|
||||||
|
|
||||||
std::unique_ptr<vk::viewable_image> find_cached_image(VkFormat format, u16 w, u16 h, u16 d, u8 mipmaps, VkFlags flags);
|
std::unique_ptr<vk::viewable_image> find_cached_image(VkFormat format, u16 w, u16 h, u16 d, u16 mipmaps, VkFlags flags);
|
||||||
|
|
||||||
std::unique_ptr<vk::viewable_image> find_cached_cubemap(VkFormat format, u16 size);
|
std::unique_ptr<vk::viewable_image> find_cached_cubemap(VkFormat format, u16 size);
|
||||||
|
|
||||||
@ -463,7 +463,7 @@ namespace vk
|
|||||||
|
|
||||||
bool handle_memory_pressure(rsx::problem_severity severity) override;
|
bool handle_memory_pressure(rsx::problem_severity severity) override;
|
||||||
|
|
||||||
u32 get_temporary_memory_in_use() const;
|
u64 get_temporary_memory_in_use() const;
|
||||||
|
|
||||||
bool is_overallocated() const;
|
bool is_overallocated() const;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user