mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-02 22:30:39 +00:00
gl: Fix crash when launching multiple games with MSAA enabled
This commit is contained in:
parent
2c023b83ba
commit
5c1552f797
4 changed files with 12 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
||||||
#include "GLGSRender.h"
|
#include "GLGSRender.h"
|
||||||
#include "GLCompute.h"
|
#include "GLCompute.h"
|
||||||
#include "GLDMA.h"
|
#include "GLDMA.h"
|
||||||
|
#include "GLResolveHelper.h"
|
||||||
|
|
||||||
#include "Emu/Memory/vm_locking.h"
|
#include "Emu/Memory/vm_locking.h"
|
||||||
#include "Emu/RSX/rsx_methods.h"
|
#include "Emu/RSX/rsx_methods.h"
|
||||||
|
@ -429,6 +430,7 @@ void GLGSRender::on_exit()
|
||||||
gl::destroy_compute_tasks();
|
gl::destroy_compute_tasks();
|
||||||
gl::destroy_overlay_passes();
|
gl::destroy_overlay_passes();
|
||||||
gl::clear_dma_resources();
|
gl::clear_dma_resources();
|
||||||
|
gl::clear_resolve_helpers();
|
||||||
|
|
||||||
gl::destroy_global_texture_resources();
|
gl::destroy_global_texture_resources();
|
||||||
|
|
||||||
|
|
|
@ -671,7 +671,7 @@ void gl::render_target::memory_barrier(gl::command_context& cmd, rsx::surface_ac
|
||||||
}
|
}
|
||||||
|
|
||||||
// MSAA support
|
// MSAA support
|
||||||
gl::viewable_image* gl::render_target::get_resolve_target_safe(gl::command_context& cmd)
|
gl::viewable_image* gl::render_target::get_resolve_target_safe(gl::command_context& /*cmd*/)
|
||||||
{
|
{
|
||||||
if (!resolve_surface)
|
if (!resolve_surface)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,6 +10,14 @@ namespace gl
|
||||||
std::unordered_map<GLuint, std::unique_ptr<ds_resolve_pass_base>> g_depth_resolvers;
|
std::unordered_map<GLuint, std::unique_ptr<ds_resolve_pass_base>> g_depth_resolvers;
|
||||||
std::unordered_map<GLuint, std::unique_ptr<ds_resolve_pass_base>> g_depth_unresolvers;
|
std::unordered_map<GLuint, std::unique_ptr<ds_resolve_pass_base>> g_depth_unresolvers;
|
||||||
|
|
||||||
|
void clear_resolve_helpers()
|
||||||
|
{
|
||||||
|
g_resolve_helpers.clear();
|
||||||
|
g_unresolve_helpers.clear();
|
||||||
|
g_depth_resolvers.clear();
|
||||||
|
g_depth_unresolvers.clear();
|
||||||
|
}
|
||||||
|
|
||||||
static const char* get_format_string(gl::texture::internal_format format)
|
static const char* get_format_string(gl::texture::internal_format format)
|
||||||
{
|
{
|
||||||
switch (format)
|
switch (format)
|
||||||
|
|
|
@ -7,6 +7,7 @@ namespace gl
|
||||||
{
|
{
|
||||||
void resolve_image(gl::command_context& cmd, gl::viewable_image* dst, gl::viewable_image* src);
|
void resolve_image(gl::command_context& cmd, gl::viewable_image* dst, gl::viewable_image* src);
|
||||||
void unresolve_image(gl::command_context& cmd, gl::viewable_image* dst, gl::viewable_image* src);
|
void unresolve_image(gl::command_context& cmd, gl::viewable_image* dst, gl::viewable_image* src);
|
||||||
|
void clear_resolve_helpers();
|
||||||
|
|
||||||
struct cs_resolve_base : compute_task
|
struct cs_resolve_base : compute_task
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue