mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 18:40:49 +00:00
Buildfix
This commit is contained in:
parent
d5f7839d12
commit
6232e0abd3
@ -361,7 +361,7 @@ SlangProcess::SlangProcess()
|
||||
}
|
||||
}
|
||||
|
||||
bool glslang::compile_spirv(const char *src, Stage stage,
|
||||
bool glslang::compile_spirv(const string &source, Stage stage,
|
||||
std::vector<uint32_t> *spirv)
|
||||
{
|
||||
string msg;
|
||||
@ -395,6 +395,7 @@ bool glslang::compile_spirv(const char *src, Stage stage,
|
||||
}
|
||||
TShader shader(language);
|
||||
|
||||
const char *src = source.c_str();
|
||||
shader.setStrings(&src, 1);
|
||||
|
||||
EShMessages messages = static_cast<EShMessages>(EShMsgDefault | EShMsgVulkanRules | EShMsgSpvRules);
|
||||
|
@ -17,7 +17,7 @@ namespace glslang
|
||||
StageCompute
|
||||
};
|
||||
|
||||
bool compile_spirv(const char *src, Stage stage, std::vector<uint32_t> *spirv);
|
||||
bool compile_spirv(const std::string &source, Stage stage, std::vector<uint32_t> *spirv);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -215,7 +215,6 @@ bool glslang_parse_meta(const struct string_list *lines, glslang_meta *meta)
|
||||
bool glslang_compile_shader(const char *shader_path, glslang_output *output)
|
||||
{
|
||||
#if defined(HAVE_GLSLANG)
|
||||
const char *v_src, *f_src;
|
||||
struct string_list *lines = string_list_new();
|
||||
|
||||
if (!lines)
|
||||
@ -229,17 +228,14 @@ bool glslang_compile_shader(const char *shader_path, glslang_output *output)
|
||||
if (!glslang_parse_meta(lines, &output->meta))
|
||||
goto error;
|
||||
|
||||
v_src = build_stage_source(lines, "vertex").c_str();
|
||||
f_src = build_stage_source(lines, "fragment").c_str();
|
||||
|
||||
if (!glslang::compile_spirv(v_src,
|
||||
if (!glslang::compile_spirv(build_stage_source(lines, "vertex"),
|
||||
glslang::StageVertex, &output->vertex))
|
||||
{
|
||||
RARCH_ERR("Failed to compile vertex shader stage.\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!glslang::compile_spirv(f_src,
|
||||
if (!glslang::compile_spirv(build_stage_source(lines, "fragment"),
|
||||
glslang::StageFragment, &output->fragment))
|
||||
{
|
||||
RARCH_ERR("Failed to compile fragment shader stage.\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user