mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
vk: Fixup for missing resource reference
- Missing ref increment when using framebuffer could lead to use-after-free. How master was not crashing is surprising
This commit is contained in:
parent
c90186cf35
commit
e515d9b83a
1 changed files with 3 additions and 3 deletions
|
@ -361,11 +361,11 @@ namespace vk
|
|||
|
||||
void run(vk::command_buffer &cmd, u16 w, u16 h, vk::image* target, const std::vector<vk::image_view*>& src, VkRenderPass render_pass)
|
||||
{
|
||||
vk::framebuffer *fbo = get_framebuffer(target, render_pass);
|
||||
auto fbo = static_cast<vk::framebuffer_holder*>(get_framebuffer(target, render_pass));
|
||||
fbo->add_ref();
|
||||
|
||||
run(cmd, w, h, fbo, src, render_pass);
|
||||
|
||||
static_cast<vk::framebuffer_holder*>(fbo)->release();
|
||||
fbo->release();
|
||||
}
|
||||
|
||||
void run(vk::command_buffer &cmd, u16 w, u16 h, vk::image* target, vk::image_view* src, VkRenderPass render_pass)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue