From c9c75f9587e164903962156167e31809be871ae7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 15 Oct 2019 17:43:53 -0400 Subject: maxwell_3d: Silence truncation warnings A trivial warning caused by not using size_t as the argument types instead of u32. --- src/video_core/engines/maxwell_3d.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 7802fd808..c5ec7d9f1 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -101,7 +101,8 @@ void Maxwell3D::InitializeRegisterDefaults() { #define DIRTY_REGS_POS(field_name) (offsetof(Maxwell3D::DirtyRegs, field_name)) void Maxwell3D::InitDirtySettings() { - const auto set_block = [this](const u32 start, const u32 range, const u8 position) { + const auto set_block = [this](const std::size_t start, const std::size_t range, + const u8 position) { const auto start_itr = dirty_pointers.begin() + start; const auto end_itr = start_itr + range; std::fill(start_itr, end_itr, position); -- cgit v1.2.3 From 77b4916b3311f97a39e3111976dcffc33ff96a1c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 15 Oct 2019 18:05:50 -0400 Subject: control_flow: Silence truncation warnings This can be trivially fixed by making the input size a size_t. CFGRebuildState's constructor parameter is already a std::size_t, so this just makes the size type fully conform with it. --- src/video_core/shader/control_flow.cpp | 4 ++-- src/video_core/shader/control_flow.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/video_core/shader/control_flow.cpp b/src/video_core/shader/control_flow.cpp index 268d1aed0..9d21f45de 100644 --- a/src/video_core/shader/control_flow.cpp +++ b/src/video_core/shader/control_flow.cpp @@ -473,8 +473,8 @@ void DecompileShader(CFGRebuildState& state) { state.manager->Decompile(); } -std::unique_ptr ScanFlow(const ProgramCode& program_code, u32 program_size, - u32 start_address, +std::unique_ptr ScanFlow(const ProgramCode& program_code, + std::size_t program_size, u32 start_address, const CompilerSettings& settings) { auto result_out = std::make_unique(); if (settings.depth == CompileDepth::BruteForce) { diff --git a/src/video_core/shader/control_flow.h b/src/video_core/shader/control_flow.h index 74e54a5c7..37e987d62 100644 --- a/src/video_core/shader/control_flow.h +++ b/src/video_core/shader/control_flow.h @@ -76,8 +76,8 @@ struct ShaderCharacteristics { CompilerSettings settings{}; }; -std::unique_ptr ScanFlow(const ProgramCode& program_code, u32 program_size, - u32 start_address, +std::unique_ptr ScanFlow(const ProgramCode& program_code, + std::size_t program_size, u32 start_address, const CompilerSettings& settings); } // namespace VideoCommon::Shader -- cgit v1.2.3