1
0
Fork 0

gl_shader_gen: Mark local functions as static where applicable

These aren't used outside of the translation unit.
This commit is contained in:
Lioncash 2020-06-08 06:40:36 -04:00
parent 9645c1e1b2
commit e79e991681
1 changed files with 6 additions and 6 deletions

View File

@ -971,8 +971,8 @@ using ProcTexShift = TexturingRegs::ProcTexShift;
using ProcTexCombiner = TexturingRegs::ProcTexCombiner; using ProcTexCombiner = TexturingRegs::ProcTexCombiner;
using ProcTexFilter = TexturingRegs::ProcTexFilter; using ProcTexFilter = TexturingRegs::ProcTexFilter;
void AppendProcTexShiftOffset(std::string& out, std::string_view v, ProcTexShift mode, static void AppendProcTexShiftOffset(std::string& out, std::string_view v, ProcTexShift mode,
ProcTexClamp clamp_mode) { ProcTexClamp clamp_mode) {
const std::string_view offset = (clamp_mode == ProcTexClamp::MirroredRepeat) ? "1.0" : "0.5"; const std::string_view offset = (clamp_mode == ProcTexClamp::MirroredRepeat) ? "1.0" : "0.5";
switch (mode) { switch (mode) {
case ProcTexShift::None: 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) { switch (mode) {
case ProcTexClamp::ToZero: case ProcTexClamp::ToZero:
out += fmt::format("{0} = {0} > 1.0 ? 0 : {0};\n", var); 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, static void AppendProcTexCombineAndMap(std::string& out, ProcTexCombiner combiner,
std::string_view offset) { std::string_view offset) {
const auto combined = [combiner]() -> std::string_view { const auto combined = [combiner]() -> std::string_view {
switch (combiner) { switch (combiner) {
case ProcTexCombiner::U: case ProcTexCombiner::U:
@ -1049,7 +1049,7 @@ void AppendProcTexCombineAndMap(std::string& out, ProcTexCombiner combiner,
out += fmt::format("ProcTexLookupLUT({}, {})", offset, combined); 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 // LUT sampling uitlity
// For NoiseLUT/ColorMap/AlphaMap, coord=0.0 is lut[0], coord=127.0/128.0 is lut[127] and // 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 // coord=1.0 is lut[127]+lut_diff[127]. For other indices, the result is interpolated using