mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-31 22:14:06 +00:00
Add path_is_file argument to function
This commit is contained in:
parent
d80db66795
commit
0f0e21441d
@ -195,7 +195,7 @@ static INLINE CGparameter find_param_from_semantic(
|
||||
}
|
||||
|
||||
static bool d3d9_cg_load_program(void *data,
|
||||
void *fragment_data, void *vertex_data, const std::string &shader)
|
||||
void *fragment_data, void *vertex_data, const std::string &shader, bool path_is_file)
|
||||
{
|
||||
char *listing_f = NULL;
|
||||
char *listing_v = NULL;
|
||||
@ -210,7 +210,7 @@ static bool d3d9_cg_load_program(void *data,
|
||||
RARCH_LOG("[D3D Cg]: Vertex profile: %s\n", cgGetProfileString(vertex_profile));
|
||||
RARCH_LOG("[D3D Cg]: Fragment profile: %s\n", cgGetProfileString(fragment_profile));
|
||||
|
||||
if (shader.length() > 0)
|
||||
if (path_is_file && shader.length() > 0)
|
||||
{
|
||||
*fPrg = cgCreateProgramFromFile(cg_data->cgCtx, CG_SOURCE,
|
||||
shader.c_str(), fragment_profile, "main_fragment", fragment_opts);
|
||||
@ -862,7 +862,7 @@ static bool renderchain_create_first_pass(cg_renderchain_t *chain,
|
||||
}
|
||||
|
||||
d3d9_cg_load_program(chain, &pass.fPrg,
|
||||
&pass.vPrg, info->pass->source.path);
|
||||
&pass.vPrg, info->pass->source.path, true);
|
||||
|
||||
if (!cg_d3d9_renderchain_init_shader_fvf(chain, &pass))
|
||||
return false;
|
||||
@ -895,7 +895,7 @@ static bool cg_d3d9_renderchain_init(void *data,
|
||||
if (!renderchain_create_first_pass(chain, info, fmt))
|
||||
return false;
|
||||
renderchain_log_info(chain, info);
|
||||
if (!d3d9_cg_load_program(chain, &chain->fStock, &chain->vStock, ""))
|
||||
if (!d3d9_cg_load_program(chain, &chain->fStock, &chain->vStock, "", false))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@ -1045,7 +1045,7 @@ static bool cg_d3d9_renderchain_add_pass(void *data, const void *info_data)
|
||||
pass.last_height = 0;
|
||||
|
||||
d3d9_cg_load_program(chain, &pass.fPrg,
|
||||
&pass.vPrg, info->pass->source.path);
|
||||
&pass.vPrg, info->pass->source.path, true);
|
||||
|
||||
if (!cg_d3d9_renderchain_init_shader_fvf(chain, &pass))
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user