From e79e991681e605fe9bf99416690beef0057b925b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 8 Jun 2020 06:40:36 -0400 Subject: [PATCH] gl_shader_gen: Mark local functions as static where applicable These aren't used outside of the translation unit. --- src/video_core/renderer_opengl/gl_shader_gen.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp index 00735b2135..cbd1b44c6e 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp @@ -971,8 +971,8 @@ using ProcTexShift = TexturingRegs::ProcTexShift; using ProcTexCombiner = TexturingRegs::ProcTexCombiner; using ProcTexFilter = TexturingRegs::ProcTexFilter; -void AppendProcTexShiftOffset(std::string& out, std::string_view v, ProcTexShift mode, - ProcTexClamp clamp_mode) { +static void AppendProcTexShiftOffset(std::string& out, std::string_view v, ProcTexShift mode, + ProcTexClamp clamp_mode) { const std::string_view offset = (clamp_mode == ProcTexClamp::MirroredRepeat) ? "1.0" : "0.5"; switch (mode) { case ProcTexShift::None: @@ -991,7 +991,7 @@ void AppendProcTexShiftOffset(std::string& out, std::string_view v, ProcTexShift } } -void AppendProcTexClamp(std::string& out, std::string_view var, ProcTexClamp mode) { +static void AppendProcTexClamp(std::string& out, std::string_view var, ProcTexClamp mode) { switch (mode) { case ProcTexClamp::ToZero: out += fmt::format("{0} = {0} > 1.0 ? 0 : {0};\n", var); @@ -1016,8 +1016,8 @@ void AppendProcTexClamp(std::string& out, std::string_view var, ProcTexClamp mod } } -void AppendProcTexCombineAndMap(std::string& out, ProcTexCombiner combiner, - std::string_view offset) { +static void AppendProcTexCombineAndMap(std::string& out, ProcTexCombiner combiner, + std::string_view offset) { const auto combined = [combiner]() -> std::string_view { switch (combiner) { case ProcTexCombiner::U: @@ -1049,7 +1049,7 @@ void AppendProcTexCombineAndMap(std::string& out, ProcTexCombiner combiner, out += fmt::format("ProcTexLookupLUT({}, {})", offset, combined); } -void AppendProcTexSampler(std::string& out, const PicaFSConfig& config) { +static void AppendProcTexSampler(std::string& out, const PicaFSConfig& config) { // LUT sampling uitlity // For NoiseLUT/ColorMap/AlphaMap, coord=0.0 is lut[0], coord=127.0/128.0 is lut[127] and // coord=1.0 is lut[127]+lut_diff[127]. For other indices, the result is interpolated using