Revert "Remove video_shader_driver_get_ident"

This reverts commit 0814cc34ee0177db6f6669ea28993449294297cd.
This commit is contained in:
twinaphex 2019-02-03 07:07:50 +01:00
parent 0814cc34ee
commit 67e777767c
3 changed files with 13 additions and 1 deletions

View File

@ -3413,7 +3413,9 @@ static void *gl_init(const video_info_t *video,
goto error;
}
RARCH_LOG("[GL]: Default shader backend found: %s.\n", gl->shader->ident);
video_shader_driver_get_ident(&ident_info);
RARCH_LOG("[GL]: Default shader backend found: %s.\n", ident_info.ident);
if (!gl_shader_init(gl, ctx_driver, hwr))
{

View File

@ -3458,6 +3458,14 @@ static const shader_backend_t *video_shader_set_backend(
return NULL;
}
bool video_shader_driver_get_ident(video_shader_ctx_ident_t *ident)
{
if (!ident || !current_shader)
return false;
ident->ident = current_shader->ident;
return true;
}
bool video_shader_driver_get_current_shader(video_shader_ctx_t *shader)
{
void *video_driver = video_driver_get_ptr(true);

View File

@ -1180,6 +1180,8 @@ enum gfx_ctx_api video_context_driver_get_api(void);
void video_context_driver_free(void);
bool video_shader_driver_get_ident(video_shader_ctx_ident_t *ident);
bool video_shader_driver_get_current_shader(video_shader_ctx_t *shader);
bool video_shader_driver_deinit(void);