mirror of
https://github.com/libretro/RetroArch
synced 2025-02-11 15:40:28 +00:00
Revert "Cleanups"
This reverts commit 3e731916caf75c6978c52a63fba49295f56b2d93.
This commit is contained in:
parent
3e731916ca
commit
d80db66795
@ -195,7 +195,7 @@ static INLINE CGparameter find_param_from_semantic(
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool d3d9_cg_load_program(void *data,
|
static bool d3d9_cg_load_program(void *data,
|
||||||
void *fragment_data, void *vertex_data, const char *prog, bool path_is_file)
|
void *fragment_data, void *vertex_data, const std::string &shader)
|
||||||
{
|
{
|
||||||
char *listing_f = NULL;
|
char *listing_f = NULL;
|
||||||
char *listing_v = NULL;
|
char *listing_v = NULL;
|
||||||
@ -210,22 +210,22 @@ static bool d3d9_cg_load_program(void *data,
|
|||||||
RARCH_LOG("[D3D Cg]: Vertex profile: %s\n", cgGetProfileString(vertex_profile));
|
RARCH_LOG("[D3D Cg]: Vertex profile: %s\n", cgGetProfileString(vertex_profile));
|
||||||
RARCH_LOG("[D3D Cg]: Fragment profile: %s\n", cgGetProfileString(fragment_profile));
|
RARCH_LOG("[D3D Cg]: Fragment profile: %s\n", cgGetProfileString(fragment_profile));
|
||||||
|
|
||||||
if (path_is_file)
|
if (shader.length() > 0)
|
||||||
{
|
{
|
||||||
*fPrg = cgCreateProgramFromFile(cg_data->cgCtx, CG_SOURCE,
|
*fPrg = cgCreateProgramFromFile(cg_data->cgCtx, CG_SOURCE,
|
||||||
prog, fragment_profile, "main_fragment", fragment_opts);
|
shader.c_str(), fragment_profile, "main_fragment", fragment_opts);
|
||||||
CG_D3D_SET_LISTING(cg_data, f);
|
CG_D3D_SET_LISTING(cg_data, f);
|
||||||
*vPrg = cgCreateProgramFromFile(cg_data->cgCtx, CG_SOURCE,
|
*vPrg = cgCreateProgramFromFile(cg_data->cgCtx, CG_SOURCE,
|
||||||
prog, vertex_profile, "main_vertex", vertex_opts);
|
shader.c_str(), vertex_profile, "main_vertex", vertex_opts);
|
||||||
CG_D3D_SET_LISTING(cg_data, v);
|
CG_D3D_SET_LISTING(cg_data, v);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*fPrg = cgCreateProgram(cg_data->cgCtx, CG_SOURCE,
|
*fPrg = cgCreateProgram(cg_data->cgCtx, CG_SOURCE, stock_cg_d3d9_program,
|
||||||
prog, fragment_profile, "main_fragment", fragment_opts);
|
fragment_profile, "main_fragment", fragment_opts);
|
||||||
CG_D3D_SET_LISTING(cg_data, f);
|
CG_D3D_SET_LISTING(cg_data, f);
|
||||||
*vPrg = cgCreateProgram(cg_data->cgCtx, CG_SOURCE,
|
*vPrg = cgCreateProgram(cg_data->cgCtx, CG_SOURCE, stock_cg_d3d9_program,
|
||||||
prog, vertex_profile, "main_vertex", vertex_opts);
|
vertex_profile, "main_vertex", vertex_opts);
|
||||||
CG_D3D_SET_LISTING(cg_data, v);
|
CG_D3D_SET_LISTING(cg_data, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -862,7 +862,7 @@ static bool renderchain_create_first_pass(cg_renderchain_t *chain,
|
|||||||
}
|
}
|
||||||
|
|
||||||
d3d9_cg_load_program(chain, &pass.fPrg,
|
d3d9_cg_load_program(chain, &pass.fPrg,
|
||||||
&pass.vPrg, info->pass->source.path.c_str(), true);
|
&pass.vPrg, info->pass->source.path);
|
||||||
|
|
||||||
if (!cg_d3d9_renderchain_init_shader_fvf(chain, &pass))
|
if (!cg_d3d9_renderchain_init_shader_fvf(chain, &pass))
|
||||||
return false;
|
return false;
|
||||||
@ -895,7 +895,7 @@ static bool cg_d3d9_renderchain_init(void *data,
|
|||||||
if (!renderchain_create_first_pass(chain, info, fmt))
|
if (!renderchain_create_first_pass(chain, info, fmt))
|
||||||
return false;
|
return false;
|
||||||
renderchain_log_info(chain, info);
|
renderchain_log_info(chain, info);
|
||||||
if (!d3d9_cg_load_program(chain, &chain->fStock, &chain->vStock, stock_cg_d3d9_program, false))
|
if (!d3d9_cg_load_program(chain, &chain->fStock, &chain->vStock, ""))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -1045,7 +1045,7 @@ static bool cg_d3d9_renderchain_add_pass(void *data, const void *info_data)
|
|||||||
pass.last_height = 0;
|
pass.last_height = 0;
|
||||||
|
|
||||||
d3d9_cg_load_program(chain, &pass.fPrg,
|
d3d9_cg_load_program(chain, &pass.fPrg,
|
||||||
&pass.vPrg, info->pass->source.path.c_str(), true);
|
&pass.vPrg, info->pass->source.path);
|
||||||
|
|
||||||
if (!cg_d3d9_renderchain_init_shader_fvf(chain, &pass))
|
if (!cg_d3d9_renderchain_init_shader_fvf(chain, &pass))
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user