mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-30 13:24:16 +01:00
gl_shader_manager: Eliminate variable shadowing
Resolves a few -Wshadow warnings.
This commit is contained in:
parent
2d83b39532
commit
138539c9a0
@ -468,13 +468,13 @@ void ShaderProgramManager::LoadDiskCache(const std::atomic_bool& stop_loading,
|
|||||||
std::vector<std::size_t> load_raws_index;
|
std::vector<std::size_t> load_raws_index;
|
||||||
// Loads both decompiled and precompiled shaders from the cache. If either one is missing for
|
// Loads both decompiled and precompiled shaders from the cache. If either one is missing for
|
||||||
const auto LoadPrecompiledWorker =
|
const auto LoadPrecompiledWorker =
|
||||||
[&](std::size_t begin, std::size_t end, const std::vector<ShaderDiskCacheRaw>& raws,
|
[&](std::size_t begin, std::size_t end, const std::vector<ShaderDiskCacheRaw>& raw_cache,
|
||||||
const ShaderDecompiledMap& decompiled, const ShaderDumpsMap& dumps) {
|
const ShaderDecompiledMap& decompiled_map, const ShaderDumpsMap& dump_map) {
|
||||||
for (std::size_t i = 0; i < end; ++i) {
|
for (std::size_t i = 0; i < end; ++i) {
|
||||||
if (stop_loading || compilation_failed) {
|
if (stop_loading || compilation_failed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto& raw{raws[i]};
|
const auto& raw{raw_cache[i]};
|
||||||
const u64 unique_identifier{raw.GetUniqueIdentifier()};
|
const u64 unique_identifier{raw.GetUniqueIdentifier()};
|
||||||
|
|
||||||
const u64 calculated_hash =
|
const u64 calculated_hash =
|
||||||
@ -488,12 +488,12 @@ void ShaderProgramManager::LoadDiskCache(const std::atomic_bool& stop_loading,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto dump{dumps.find(unique_identifier)};
|
const auto dump{dump_map.find(unique_identifier)};
|
||||||
const auto decomp{decompiled.find(unique_identifier)};
|
const auto decomp{decompiled_map.find(unique_identifier)};
|
||||||
|
|
||||||
OGLProgram shader;
|
OGLProgram shader;
|
||||||
|
|
||||||
if (dump != dumps.end() && decomp != decompiled.end()) {
|
if (dump != dump_map.end() && decomp != decompiled_map.end()) {
|
||||||
// Only load this shader if its sanitize_mul setting matches
|
// Only load this shader if its sanitize_mul setting matches
|
||||||
if (decomp->second.sanitize_mul == VideoCore::g_hw_shader_accurate_mul) {
|
if (decomp->second.sanitize_mul == VideoCore::g_hw_shader_accurate_mul) {
|
||||||
continue;
|
continue;
|
||||||
@ -533,7 +533,7 @@ void ShaderProgramManager::LoadDiskCache(const std::atomic_bool& stop_loading,
|
|||||||
load_raws_index.push_back(i);
|
load_raws_index.push_back(i);
|
||||||
}
|
}
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback(VideoCore::LoadCallbackStage::Decompile, i, raws.size());
|
callback(VideoCore::LoadCallbackStage::Decompile, i, raw_cache.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -554,12 +554,12 @@ void ShaderProgramManager::LoadDiskCache(const std::atomic_bool& stop_loading,
|
|||||||
compilation_failed = false;
|
compilation_failed = false;
|
||||||
|
|
||||||
const auto LoadTransferable = [&](std::size_t begin, std::size_t end,
|
const auto LoadTransferable = [&](std::size_t begin, std::size_t end,
|
||||||
const std::vector<ShaderDiskCacheRaw>& raws) {
|
const std::vector<ShaderDiskCacheRaw>& raw_cache) {
|
||||||
for (std::size_t i = 0; i < end; ++i) {
|
for (std::size_t i = 0; i < end; ++i) {
|
||||||
if (stop_loading || compilation_failed) {
|
if (stop_loading || compilation_failed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto& raw{raws[i]};
|
const auto& raw{raw_cache[i]};
|
||||||
const u64 unique_identifier{raw.GetUniqueIdentifier()};
|
const u64 unique_identifier{raw.GetUniqueIdentifier()};
|
||||||
|
|
||||||
bool sanitize_mul = false;
|
bool sanitize_mul = false;
|
||||||
@ -603,7 +603,7 @@ void ShaderProgramManager::LoadDiskCache(const std::atomic_bool& stop_loading,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback(VideoCore::LoadCallbackStage::Build, i, raws.size());
|
callback(VideoCore::LoadCallbackStage::Build, i, raw_cache.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user