From 3c1c6758c72cb4b45a538c0a37aefc600c5b5cb2 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 18 May 2018 01:38:45 +0200 Subject: [PATCH] Update --- gfx/drivers_renderchain/d3d9_hlsl_renderchain.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gfx/drivers_renderchain/d3d9_hlsl_renderchain.c b/gfx/drivers_renderchain/d3d9_hlsl_renderchain.c index 13fc128a5a..dfa4e9ad62 100644 --- a/gfx/drivers_renderchain/d3d9_hlsl_renderchain.c +++ b/gfx/drivers_renderchain/d3d9_hlsl_renderchain.c @@ -106,14 +106,20 @@ static bool d3d9_hlsl_load_program( ID3DXBuffer *code_f = NULL; ID3DXBuffer *code_v = NULL; - if (path_is_file) + if (path_is_file && !string_is_empty(prog)) { if (!d3d9x_compile_shader_from_file(prog, NULL, NULL, "main_fragment", "ps_3_0", 0, &code_f, &listing_f, &pass->ftable)) + { + RARCH_ERR("Could not compile fragment shader program (%s)..\n", prog); goto error; + } if (!d3d9x_compile_shader_from_file(prog, NULL, NULL, "main_vertex", "vs_3_0", 0, &code_v, &listing_v, &pass->vtable)) + { + RARCH_ERR("Could not compile vertex shader program (%s)..\n", prog); goto error; + } } else { @@ -121,14 +127,14 @@ static bool d3d9_hlsl_load_program( "main_fragment", "ps_3_0", 0, &code_f, &listing_f, &pass->ftable )) { - RARCH_ERR("Failure building stock fragment shader..\n"); + RARCH_ERR("Could not compile stock fragment shader..\n"); goto error; } if (!d3d9x_compile_shader(prog, strlen(prog), NULL, NULL, "main_vertex", "vs_3_0", 0, &code_v, &listing_v, &pass->vtable )) { - RARCH_ERR("Failure building stock vertex shader..\n"); + RARCH_ERR("Could not compile stock vertex shader..\n"); goto error; } }