mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-15 23:06:40 +00:00
(PS3 Cg) Fixed crash at game start - Cg state was never properly
deinited for PS3 before and we relied on a very dirty hack to set CgContext to NULL - we can get rid of all that crap now. PS3 build is now 'fixed' - only thing remaining is that we should have a mechanism inside the menu to 'reinit' any graphics assets that were previously set before we lost the state (for instance - RMenu has one texture image it loads at init_assets time).
This commit is contained in:
parent
e1072da17f
commit
125a4e3c43
3
gfx/gl.c
3
gfx/gl.c
@ -2644,9 +2644,6 @@ static void gl_restart(void)
|
||||
void *data = driver.video_data;
|
||||
driver.video_data = NULL;
|
||||
gl_free(data);
|
||||
#ifdef HAVE_CG
|
||||
gl_cg_invalidate_context();
|
||||
#endif
|
||||
init_video_input();
|
||||
}
|
||||
#endif
|
||||
|
@ -396,15 +396,12 @@ static void gl_cg_deinit_state(void)
|
||||
// Final deinit.
|
||||
static void gl_cg_deinit_context_state(void)
|
||||
{
|
||||
// Destroying context breaks on PS3 for some unknown reason.
|
||||
#ifndef __CELLOS_LV2__
|
||||
if (cgCtx)
|
||||
{
|
||||
RARCH_LOG("CG: Destroying context.\n");
|
||||
cgDestroyContext(cgCtx);
|
||||
cgCtx = NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Full deinit.
|
||||
@ -940,11 +937,6 @@ static struct gfx_shader *gl_cg_get_current_shader(void)
|
||||
return cg_active ? cg_shader : NULL;
|
||||
}
|
||||
|
||||
void gl_cg_invalidate_context(void)
|
||||
{
|
||||
cgCtx = NULL;
|
||||
}
|
||||
|
||||
const gl_shader_backend_t gl_cg_backend = {
|
||||
gl_cg_init,
|
||||
gl_cg_deinit,
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "shader_common.h"
|
||||
#include <stdint.h>
|
||||
|
||||
void gl_cg_invalidate_context(void); // Call when resetting GL context on PS3.
|
||||
extern const gl_shader_backend_t gl_cg_backend;
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user