mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
bound_tex is no longer a vector
This commit is contained in:
parent
a425ca98ed
commit
f45f3da8fb
@ -83,7 +83,12 @@ typedef struct cg_renderchain
|
||||
unsigned luts_count;
|
||||
D3DVIEWPORT *final_viewport;
|
||||
unsigned frame_count;
|
||||
std::vector<unsigned> bound_tex;
|
||||
struct
|
||||
{
|
||||
unsigned list[GFX_MAX_TEXTURES];
|
||||
unsigned current;
|
||||
unsigned size;
|
||||
} bound_tex;
|
||||
std::vector<unsigned> bound_vert;
|
||||
CGcontext cgCtx;
|
||||
} cg_renderchain_t;
|
||||
@ -515,7 +520,7 @@ static void renderchain_bind_orig(cg_renderchain_t *chain, void *pass_data)
|
||||
translate_filter(chain->passes[0].info.pass->filter));
|
||||
d3d_set_sampler_address_u(chain->dev, index, D3DTADDRESS_BORDER);
|
||||
d3d_set_sampler_address_v(chain->dev, index, D3DTADDRESS_BORDER);
|
||||
chain->bound_tex.push_back(index);
|
||||
chain->bound_tex.list[chain->bound_tex.current++] = index;
|
||||
}
|
||||
|
||||
param = cgGetNamedParameter(pass->vPrg, "ORIG.tex_coord");
|
||||
@ -579,7 +584,7 @@ static void renderchain_bind_prev(cg_renderchain_t *chain, void *pass_data)
|
||||
chain->prev.tex[(chain->prev.ptr - (i + 1)) & TEXTURESMASK];
|
||||
|
||||
d3d_set_texture(chain->dev, index, tex);
|
||||
chain->bound_tex.push_back(index);
|
||||
chain->bound_tex.list[chain->bound_tex.current++] = index;
|
||||
|
||||
d3d_set_sampler_magfilter(chain->dev, index,
|
||||
translate_filter(chain->passes[0].info.pass->filter));
|
||||
@ -618,7 +623,7 @@ static void cg_d3d9_renderchain_add_lut(void *data,
|
||||
translate_filter(chain->luts[i]->smooth ? RARCH_FILTER_LINEAR : RARCH_FILTER_NEAREST));
|
||||
d3d_set_sampler_address_u(chain->dev, index, D3DTADDRESS_BORDER);
|
||||
d3d_set_sampler_address_v(chain->dev, index, D3DTADDRESS_BORDER);
|
||||
chain->bound_tex.push_back(index);
|
||||
chain->bound_tex.list[chain->bound_tex.current++] = index;
|
||||
}
|
||||
|
||||
static void renderchain_bind_luts(cg_renderchain_t *chain,
|
||||
@ -690,7 +695,7 @@ static void renderchain_bind_pass(cg_renderchain_t *chain,
|
||||
if (param)
|
||||
{
|
||||
index = cgGetParameterResourceIndex(param);
|
||||
chain->bound_tex.push_back(index);
|
||||
chain->bound_tex.list[chain->bound_tex.current++] = index;
|
||||
|
||||
d3d_set_texture(chain->dev, index, chain->passes[i].tex);
|
||||
d3d_set_sampler_magfilter(chain->dev, index,
|
||||
@ -1346,19 +1351,21 @@ static void renderchain_unbind_all(cg_renderchain_t *chain)
|
||||
/* 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++)
|
||||
for (i = 0; i < chain->bound_tex.size; i++)
|
||||
{
|
||||
d3d_set_sampler_minfilter(d3dr,
|
||||
chain->bound_tex[i], D3DTEXF_POINT);
|
||||
chain->bound_tex.list[i], D3DTEXF_POINT);
|
||||
d3d_set_sampler_magfilter(d3dr,
|
||||
chain->bound_tex[i], D3DTEXF_POINT);
|
||||
d3d_set_texture(d3dr, chain->bound_tex[i], NULL);
|
||||
chain->bound_tex.list[i], D3DTEXF_POINT);
|
||||
d3d_set_texture(d3dr, chain->bound_tex.list[i], NULL);
|
||||
chain->bound_tex.list[i] = 0;
|
||||
}
|
||||
|
||||
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_tex.current = 0;
|
||||
chain->bound_tex.size = 0;
|
||||
chain->bound_vert.clear();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user