mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-23 03:10:14 +00:00
(D3D) Move renderchain_unbind_all up
This commit is contained in:
parent
b48d6306df
commit
ca39d5f707
@ -1278,6 +1278,31 @@ static void renderchain_blit_to_texture(void *data,
|
||||
&d3dlr, frame, width, height, pitch);
|
||||
}
|
||||
|
||||
static void renderchain_unbind_all(void *data)
|
||||
{
|
||||
unsigned i;
|
||||
renderchain_t *chain = (renderchain_t*)data;
|
||||
LPDIRECT3DDEVICE d3dr = (LPDIRECT3DDEVICE)chain->dev;
|
||||
|
||||
/* Have to be a bit anal about it.
|
||||
* Render targets hate it when they have filters apparently.
|
||||
*/
|
||||
for (i = 0; i < chain->bound_tex.size(); i++)
|
||||
{
|
||||
d3d_set_sampler_minfilter(d3dr,
|
||||
chain->bound_tex[i], D3DTEXF_POINT);
|
||||
d3d_set_sampler_magfilter(d3dr,
|
||||
chain->bound_tex[i], D3DTEXF_POINT);
|
||||
d3d_set_texture(d3dr, chain->bound_tex[i], NULL);
|
||||
}
|
||||
|
||||
for (i = 0; i < chain->bound_vert.size(); i++)
|
||||
d3d_set_stream_source(d3dr, chain->bound_vert[i], 0, 0, 0);
|
||||
|
||||
chain->bound_tex.clear();
|
||||
chain->bound_vert.clear();
|
||||
}
|
||||
|
||||
static void renderchain_render_pass(void *data, void *pass_data, unsigned pass_index)
|
||||
{
|
||||
unsigned i;
|
||||
@ -1453,30 +1478,3 @@ void renderchain_convert_geometry(
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void renderchain_unbind_all(void *data)
|
||||
{
|
||||
unsigned i;
|
||||
renderchain_t *chain = (renderchain_t*)data;
|
||||
LPDIRECT3DDEVICE d3dr = (LPDIRECT3DDEVICE)chain->dev;
|
||||
|
||||
/* Have to be a bit anal about it.
|
||||
* Render targets hate it when they have filters apparently.
|
||||
*/
|
||||
for (i = 0; i < chain->bound_tex.size(); i++)
|
||||
{
|
||||
d3d_set_sampler_minfilter(d3dr,
|
||||
chain->bound_tex[i], D3DTEXF_POINT);
|
||||
d3d_set_sampler_magfilter(d3dr,
|
||||
chain->bound_tex[i], D3DTEXF_POINT);
|
||||
d3d_set_texture(d3dr, chain->bound_tex[i], NULL);
|
||||
}
|
||||
|
||||
for (i = 0; i < chain->bound_vert.size(); i++)
|
||||
d3d_set_stream_source(d3dr, chain->bound_vert[i], 0, 0, 0);
|
||||
|
||||
chain->bound_tex.clear();
|
||||
chain->bound_vert.clear();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user