mirror of
https://github.com/libretro/RetroArch
synced 2025-04-11 00:44:20 +00:00
Make gl2_renderchain_deinit_fbo safer
This commit is contained in:
parent
88d62c7766
commit
df5586570f
@ -8,6 +8,8 @@
|
|||||||
- CHEEVOS: Support Atari 2600, Virtual Boy, and Arcade (only Neo Geo, CPS-1, CPS-2 and CPS-3 and only with fbalpha core).
|
- CHEEVOS: Support Atari 2600, Virtual Boy, and Arcade (only Neo Geo, CPS-1, CPS-2 and CPS-3 and only with fbalpha core).
|
||||||
- CHEEVOS: Add option to automatically take a screenshot when an achievement is triggered.
|
- CHEEVOS: Add option to automatically take a screenshot when an achievement is triggered.
|
||||||
- CHEEVOS: Fixed incompatibilities with Neo Geo Pocket achievement sets.
|
- CHEEVOS: Fixed incompatibilities with Neo Geo Pocket achievement sets.
|
||||||
|
- D3D10: Added D3D10 driver to release build. Has working shaders (Slang), overlay, and menu display driver support. Should be on par capabilities wise
|
||||||
|
with D3D11 driver except for there being no hardware rendering right now.
|
||||||
- D3D11: Experimental hardware renderer. Allows for libretro cores to use D3D11 for hardware rendering.
|
- D3D11: Experimental hardware renderer. Allows for libretro cores to use D3D11 for hardware rendering.
|
||||||
- D3D11/D3D12: Fix crashes with completely black or white thumbnail textures in XMB.
|
- D3D11/D3D12: Fix crashes with completely black or white thumbnail textures in XMB.
|
||||||
- LIBRETRO: Addition - Functions to enable and disable audio and video, and an environment function to query status of audio and video enables.
|
- LIBRETRO: Addition - Functions to enable and disable audio and video, and an environment function to query status of audio and video enables.
|
||||||
|
@ -504,27 +504,30 @@ static void gl2_renderchain_deinit_fbo(void *data,
|
|||||||
gl_t *gl = (gl_t*)data;
|
gl_t *gl = (gl_t*)data;
|
||||||
gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data;
|
gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data;
|
||||||
|
|
||||||
if (!gl)
|
if (gl)
|
||||||
return;
|
{
|
||||||
|
if (gl->fbo_feedback)
|
||||||
|
gl2_delete_fb(1, &gl->fbo_feedback);
|
||||||
|
if (gl->fbo_feedback_texture)
|
||||||
|
glDeleteTextures(1, &gl->fbo_feedback_texture);
|
||||||
|
|
||||||
glDeleteTextures(chain->fbo_pass, chain->fbo_texture);
|
gl->fbo_inited = false;
|
||||||
gl2_delete_fb(chain->fbo_pass, chain->fbo);
|
gl->fbo_feedback_enable = false;
|
||||||
|
gl->fbo_feedback_pass = 0;
|
||||||
|
gl->fbo_feedback_texture = 0;
|
||||||
|
gl->fbo_feedback = 0;
|
||||||
|
}
|
||||||
|
|
||||||
memset(chain->fbo_texture, 0, sizeof(chain->fbo_texture));
|
if (chain)
|
||||||
memset(chain->fbo, 0, sizeof(chain->fbo));
|
{
|
||||||
|
glDeleteTextures(chain->fbo_pass, chain->fbo_texture);
|
||||||
|
gl2_delete_fb(chain->fbo_pass, chain->fbo);
|
||||||
|
|
||||||
if (gl->fbo_feedback)
|
memset(chain->fbo_texture, 0, sizeof(chain->fbo_texture));
|
||||||
gl2_delete_fb(1, &gl->fbo_feedback);
|
memset(chain->fbo, 0, sizeof(chain->fbo));
|
||||||
if (gl->fbo_feedback_texture)
|
|
||||||
glDeleteTextures(1, &gl->fbo_feedback_texture);
|
|
||||||
|
|
||||||
chain->fbo_pass = 0;
|
chain->fbo_pass = 0;
|
||||||
|
}
|
||||||
gl->fbo_inited = false;
|
|
||||||
gl->fbo_feedback_enable = false;
|
|
||||||
gl->fbo_feedback_pass = 0;
|
|
||||||
gl->fbo_feedback_texture = 0;
|
|
||||||
gl->fbo_feedback = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gl2_renderchain_deinit_hw_render(
|
static void gl2_renderchain_deinit_hw_render(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user