mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
Reimplement slang_preprocess_parse_parameters
This commit is contained in:
parent
cd6e1cf3fa
commit
0a69d14b11
@ -428,26 +428,23 @@ bool slang_preprocess_parse_parameters(const char *shader_path,
|
||||
struct video_shader *shader)
|
||||
{
|
||||
glslang_meta meta;
|
||||
bool ret = false;
|
||||
struct string_list *lines = string_list_new();
|
||||
struct string_list lines;
|
||||
|
||||
if (!lines)
|
||||
goto end;
|
||||
if (!string_list_initialize(&lines))
|
||||
goto error;
|
||||
|
||||
if (!glslang_read_shader_file(shader_path, lines, true))
|
||||
goto end;
|
||||
if (!glslang_read_shader_file(shader_path, &lines, true))
|
||||
goto error;
|
||||
meta = glslang_meta{};
|
||||
if (!glslang_parse_meta(lines, &meta))
|
||||
goto end;
|
||||
if (!glslang_parse_meta(&lines, &meta))
|
||||
goto error;
|
||||
|
||||
ret = slang_preprocess_parse_parameters(meta, shader);
|
||||
string_list_deinitialize(&lines);
|
||||
return slang_preprocess_parse_parameters(meta, shader);
|
||||
|
||||
end:
|
||||
|
||||
if (lines)
|
||||
string_list_free(lines);
|
||||
|
||||
return ret;
|
||||
error:
|
||||
string_list_deinitialize(&lines);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool slang_process(
|
||||
|
@ -235,9 +235,9 @@ struct string_list *dir_list_new(const char *dir,
|
||||
bool include_hidden, bool include_compressed,
|
||||
bool recursive)
|
||||
{
|
||||
struct string_list *list = NULL;
|
||||
struct string_list *list = string_list_new();
|
||||
|
||||
if (!(list = string_list_new()))
|
||||
if (!list)
|
||||
return NULL;
|
||||
|
||||
if (!dir_list_append(list, dir, ext, include_dirs,
|
||||
|
Loading…
x
Reference in New Issue
Block a user