rpcs3 icon indicating copy to clipboard operation
rpcs3 copied to clipboard

rsx: Misc fixes

Open kd-11 opened this issue 8 months ago • 1 comments

https://godbolt.org/z/4745MGT6z

kd-11 avatar Apr 26 '25 16:04 kd-11

in #17088 you fixed some double releases (due to commit c7d9ec5) causing issues when trying to fix #17086 but I see at the end you also removed some checks on pointer validity such as the following in VKGSRender.cpp:

if (m_vertex_layout_storage)
{
	vk::get_gc()->dispose(m_vertex_layout_storage);
}

Shouldn't you check the validity of the reference at the beginning of the new used vk::get_resource_manager()->dispose() method? something like:

if (!object)
{
	return;
}

digant73 avatar Apr 26 '25 22:04 digant73

in #17088 you fixed some double releases (due to commit c7d9ec5) causing issues when trying to fix #17086 but I see at the end you also removed some checks on pointer validity such as the following in VKGSRender.cpp:

if (m_vertex_layout_storage)
{
	vk::get_gc()->dispose(m_vertex_layout_storage);
}

Shouldn't you check the validity of the reference at the beginning of the new used vk::get_resource_manager()->dispose() method? something like:

if (!object)
{
	return;
}

This is handled downstream in disposable_t dtor. It is intentional, gc runs on a separate thread so we let any logic run checks from that side.

kd-11 avatar Apr 27 '25 12:04 kd-11