mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 16:31:28 +12:00
rsx: Apply Clang-Tidy fix "readability-redundant-smartptr-get"
This commit is contained in:
parent
801fa0113f
commit
ac7e89660f
4 changed files with 9 additions and 9 deletions
|
@ -168,7 +168,7 @@ namespace gl
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ASSERT(managed_texture.get() == nullptr);
|
ASSERT(!managed_texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
flushed = false;
|
flushed = false;
|
||||||
|
@ -396,7 +396,7 @@ namespace gl
|
||||||
*/
|
*/
|
||||||
void destroy()
|
void destroy()
|
||||||
{
|
{
|
||||||
if (!is_locked() && pbo_id == 0 && vram_texture == nullptr && m_fence.is_empty() && managed_texture.get() == nullptr)
|
if (!is_locked() && pbo_id == 0 && vram_texture == nullptr && m_fence.is_empty() && !managed_texture)
|
||||||
//Already destroyed
|
//Already destroyed
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -427,7 +427,7 @@ namespace gl
|
||||||
|
|
||||||
bool is_managed() const
|
bool is_managed() const
|
||||||
{
|
{
|
||||||
return !exists() || managed_texture.get() != nullptr;
|
return !exists() || managed_texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
texture::format get_format() const
|
texture::format get_format() const
|
||||||
|
|
|
@ -539,7 +539,7 @@ VKGSRender::VKGSRender() : GSRender()
|
||||||
else
|
else
|
||||||
m_vertex_cache.reset(new vk::weak_vertex_cache());
|
m_vertex_cache.reset(new vk::weak_vertex_cache());
|
||||||
|
|
||||||
m_shaders_cache.reset(new vk::shader_cache(*m_prog_buffer.get(), "vulkan", "v1.7"));
|
m_shaders_cache.reset(new vk::shader_cache(*m_prog_buffer, "vulkan", "v1.7"));
|
||||||
|
|
||||||
open_command_buffer();
|
open_command_buffer();
|
||||||
|
|
||||||
|
|
|
@ -1965,7 +1965,7 @@ public:
|
||||||
|
|
||||||
VkImage& get_image(u32 index) override
|
VkImage& get_image(u32 index) override
|
||||||
{
|
{
|
||||||
return (VkImage&)(*swapchain_images[index].second.get());
|
return (VkImage&)(*swapchain_images[index].second);
|
||||||
}
|
}
|
||||||
|
|
||||||
VkImageLayout get_optimal_present_layout() override
|
VkImageLayout get_optimal_present_layout() override
|
||||||
|
|
|
@ -88,7 +88,7 @@ namespace vk
|
||||||
|
|
||||||
void release_dma_resources()
|
void release_dma_resources()
|
||||||
{
|
{
|
||||||
if (dma_buffer.get() != nullptr)
|
if (dma_buffer)
|
||||||
{
|
{
|
||||||
dma_buffer.reset();
|
dma_buffer.reset();
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ namespace vk
|
||||||
m_tex_cache->on_section_destroyed(*this);
|
m_tex_cache->on_section_destroyed(*this);
|
||||||
|
|
||||||
vram_texture = nullptr;
|
vram_texture = nullptr;
|
||||||
ASSERT(managed_texture.get() == nullptr);
|
ASSERT(!managed_texture);
|
||||||
release_dma_resources();
|
release_dma_resources();
|
||||||
|
|
||||||
baseclass::on_section_resources_destroyed();
|
baseclass::on_section_resources_destroyed();
|
||||||
|
@ -121,7 +121,7 @@ namespace vk
|
||||||
|
|
||||||
bool is_managed() const
|
bool is_managed() const
|
||||||
{
|
{
|
||||||
return !exists() || managed_texture.get() != nullptr;
|
return !exists() || managed_texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
vk::image_view* get_view(u32 remap_encoding, const std::pair<std::array<u8, 4>, std::array<u8, 4>>& remap)
|
vk::image_view* get_view(u32 remap_encoding, const std::pair<std::array<u8, 4>, std::array<u8, 4>>& remap)
|
||||||
|
@ -183,7 +183,7 @@ namespace vk
|
||||||
vkCreateEvent(*m_device, &createInfo, nullptr, &dma_fence);
|
vkCreateEvent(*m_device, &createInfo, nullptr, &dma_fence);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dma_buffer.get() == nullptr)
|
if (!dma_buffer)
|
||||||
{
|
{
|
||||||
auto memory_type = m_device->get_memory_mapping().host_visible_coherent;
|
auto memory_type = m_device->get_memory_mapping().host_visible_coherent;
|
||||||
dma_buffer.reset(new vk::buffer(*m_device, align(get_section_size(), 256), memory_type, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, VK_BUFFER_USAGE_TRANSFER_DST_BIT, 0));
|
dma_buffer.reset(new vk::buffer(*m_device, align(get_section_size(), 256), memory_type, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, VK_BUFFER_USAGE_TRANSFER_DST_BIT, 0));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue