diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 97e2ccc6a5..689825bc70 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -1091,10 +1091,9 @@ static void gl2_renderchain_init( video_shader_ctx_info_t shader_info; struct gfx_fbo_scale scale, scale_last; - if (!video_shader_driver_info(&shader_info)) - return; + shader_info.num = gl->shader->num_shaders(gl->shader_data); - if (!gl || shader_info.num == 0) + if (shader_info.num == 0) return; video_driver_get_size(&width, &height); @@ -3439,11 +3438,7 @@ static void *gl_init(const video_info_t *video, gl->textures = MAX(minimum + 1, gl->textures); } - if (!video_shader_driver_info(&shader_info)) - { - RARCH_ERR("[GL]: Shader driver info check failed.\n"); - goto error; - } + shader_info.num = gl->shader->num_shaders(gl->shader_data); RARCH_LOG("[GL]: Using %u textures.\n", gl->textures); RARCH_LOG("[GL]: Loaded %u program(s).\n", diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 7dfa0874ad..ae6e5d54f5 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -3562,16 +3562,6 @@ bool video_shader_driver_init(video_shader_ctx_init_t *init) return true; } -bool video_shader_driver_info(video_shader_ctx_info_t *shader_info) -{ - if (!shader_info) - return false; - - shader_info->num = current_shader->num_shaders(current_shader_data); - - return true; -} - void video_driver_set_coords(video_shader_ctx_coords_t *coords) { if (current_shader && current_shader->set_coords) diff --git a/gfx/video_driver.h b/gfx/video_driver.h index c88721e4b0..9b6bff23b1 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -1182,18 +1182,16 @@ 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); bool video_shader_driver_init_first(void); +bool video_shader_driver_get_current_shader(video_shader_ctx_t *shader); + bool video_shader_driver_init(video_shader_ctx_init_t *init); void video_driver_set_coords(video_shader_ctx_coords_t *coords); -bool video_shader_driver_info(video_shader_ctx_info_t *shader_info); - void video_driver_set_mvp(video_shader_ctx_mvp_t *mvp); float video_driver_get_refresh_rate(void); diff --git a/ui/drivers/qt/shaderparamsdialog.cpp b/ui/drivers/qt/shaderparamsdialog.cpp index 3935fa8521..89a1fb9882 100644 --- a/ui/drivers/qt/shaderparamsdialog.cpp +++ b/ui/drivers/qt/shaderparamsdialog.cpp @@ -28,6 +28,7 @@ extern "C" { #include #include "../../../command.h" #include "../../../configuration.h" +#include "../../../gfx/video_driver.h" #include "../../../retroarch.h" #include "../../../paths.h" #include "../../../file_path_special.h"