diff options
author | Rodrigo Locatti <reinuseslisp@airmail.cc> | 2019-11-13 06:16:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-13 06:16:22 +0100 |
commit | cf770a68a528cdb7f3a5483f6d17eeb924e37b7e (patch) | |
tree | 6406933e26e9fbe255a04b4c0810d21b05815494 /src/video_core/shader | |
parent | Update CONTRIBUTING.md (diff) | |
parent | video_core: Enable sign conversion warnings (diff) | |
download | yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.tar yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.tar.gz yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.tar.bz2 yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.tar.lz yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.tar.xz yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.tar.zst yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.zip |
Diffstat (limited to 'src/video_core/shader')
-rw-r--r-- | src/video_core/shader/decode.cpp | 4 | ||||
-rw-r--r-- | src/video_core/shader/shader_ir.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/video_core/shader/decode.cpp b/src/video_core/shader/decode.cpp index 21fb9cb83..22c3e5120 100644 --- a/src/video_core/shader/decode.cpp +++ b/src/video_core/shader/decode.cpp @@ -154,10 +154,10 @@ void ShaderIR::Decode() { LOG_CRITICAL(HW_GPU, "Unknown decompilation mode!"); [[fallthrough]]; case CompileDepth::BruteForce: { + const auto shader_end = static_cast<u32>(program_code.size()); coverage_begin = main_offset; - const std::size_t shader_end = program_code.size(); coverage_end = shader_end; - for (u32 label = main_offset; label < shader_end; label++) { + for (u32 label = main_offset; label < shader_end; ++label) { basic_blocks.insert({label, DecodeRange(label, label + 1)}); } break; diff --git a/src/video_core/shader/shader_ir.h b/src/video_core/shader/shader_ir.h index 26c8fde22..76a849818 100644 --- a/src/video_core/shader/shader_ir.h +++ b/src/video_core/shader/shader_ir.h @@ -49,7 +49,7 @@ public: } u32 GetSize() const { - return max_offset + sizeof(float); + return max_offset + static_cast<u32>(sizeof(float)); } u32 GetMaxOffset() const { @@ -165,8 +165,8 @@ public: return program_manager.GetVariables(); } - u32 ConvertAddressToNvidiaSpace(const u32 address) const { - return (address - main_offset) * sizeof(Tegra::Shader::Instruction); + u32 ConvertAddressToNvidiaSpace(u32 address) const { + return (address - main_offset) * static_cast<u32>(sizeof(Tegra::Shader::Instruction)); } /// Returns a condition code evaluated from internal flags |