mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
(D3D) Start going through d3d_texture_free/d3d_vertex_buffer_free
This commit is contained in:
parent
0b5a9a244c
commit
633c05d677
@ -1345,10 +1345,8 @@ static void d3d_free_overlay(void *data, overlay_t *overlay)
|
||||
{
|
||||
d3d_video_t *d3d = (d3d_video_t*)data;
|
||||
|
||||
if (overlay->tex)
|
||||
overlay->tex->Release();
|
||||
if (overlay->vert_buf)
|
||||
overlay->vert_buf->Release();
|
||||
d3d_texture_free(overlay->tex);
|
||||
d3d_vertex_buffer_free(overlay->vert_buf);
|
||||
}
|
||||
|
||||
static void d3d_free_overlays(void *data)
|
||||
@ -1752,8 +1750,9 @@ static void d3d_set_menu_texture_frame(void *data,
|
||||
if (!d3d->menu->tex || d3d->menu->tex_w != width
|
||||
|| d3d->menu->tex_h != height)
|
||||
{
|
||||
if (d3d->menu && d3d->menu->tex)
|
||||
d3d->menu->tex->Release();
|
||||
if (d3d->menu)
|
||||
d3d_texture_free(d3d->menu->tex);
|
||||
|
||||
if (FAILED(d3d->dev->CreateTexture(width, height, 1,
|
||||
0, D3DFMT_A8R8G8B8,
|
||||
D3DPOOL_MANAGED,
|
||||
|
@ -77,9 +77,9 @@ void renderchain_clear(void *data)
|
||||
for (unsigned i = 0; i < TEXTURES; i++)
|
||||
{
|
||||
if (chain->prev.tex[i])
|
||||
chain->prev.tex[i]->Release();
|
||||
d3d_texture_free(chain->prev.tex[i]);
|
||||
if (chain->prev.vertex_buf[i])
|
||||
chain->prev.vertex_buf[i]->Release();
|
||||
d3d_vertex_buffer_free(chain->prev.vertex_buf[i]);
|
||||
}
|
||||
|
||||
if (chain->passes[0].vertex_decl)
|
||||
@ -87,9 +87,9 @@ void renderchain_clear(void *data)
|
||||
for (unsigned i = 1; i < chain->passes.size(); i++)
|
||||
{
|
||||
if (chain->passes[i].tex)
|
||||
chain->passes[i].tex->Release();
|
||||
d3d_texture_free(chain->passes[i].tex);
|
||||
if (chain->passes[i].vertex_buf)
|
||||
chain->passes[i].vertex_buf->Release();
|
||||
d3d_vertex_buffer_free(chain->passes[i].vertex_buf);
|
||||
if (chain->passes[i].vertex_decl)
|
||||
chain->passes[i].vertex_decl->Release();
|
||||
renderchain_destroy_shader(chain, i);
|
||||
@ -98,7 +98,7 @@ void renderchain_clear(void *data)
|
||||
for (unsigned i = 0; i < chain->luts.size(); i++)
|
||||
{
|
||||
if (chain->luts[i].tex)
|
||||
chain->luts[i].tex->Release();
|
||||
d3d_texture_free(chain->luts[i].tex);
|
||||
}
|
||||
|
||||
chain->passes.clear();
|
||||
@ -120,7 +120,8 @@ bool renderchain_set_pass_size(void *data, unsigned pass_index,
|
||||
Pass *pass = (Pass*)&chain->passes[pass_index];
|
||||
if (width != pass->info.tex_w || height != pass->info.tex_h)
|
||||
{
|
||||
pass->tex->Release();
|
||||
d3d_texture_free(pass->tex);
|
||||
|
||||
pass->info.tex_w = width;
|
||||
pass->info.tex_h = height;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user