summaryrefslogtreecommitdiff
path: root/src/video_core/shader
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/shader')
-rw-r--r--src/video_core/shader/decode.cpp4
-rw-r--r--src/video_core/shader/shader_ir.h6
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() {
154 LOG_CRITICAL(HW_GPU, "Unknown decompilation mode!"); 154 LOG_CRITICAL(HW_GPU, "Unknown decompilation mode!");
155 [[fallthrough]]; 155 [[fallthrough]];
156 case CompileDepth::BruteForce: { 156 case CompileDepth::BruteForce: {
157 const auto shader_end = static_cast<u32>(program_code.size());
157 coverage_begin = main_offset; 158 coverage_begin = main_offset;
158 const std::size_t shader_end = program_code.size();
159 coverage_end = shader_end; 159 coverage_end = shader_end;
160 for (u32 label = main_offset; label < shader_end; label++) { 160 for (u32 label = main_offset; label < shader_end; ++label) {
161 basic_blocks.insert({label, DecodeRange(label, label + 1)}); 161 basic_blocks.insert({label, DecodeRange(label, label + 1)});
162 } 162 }
163 break; 163 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:
49 } 49 }
50 50
51 u32 GetSize() const { 51 u32 GetSize() const {
52 return max_offset + sizeof(float); 52 return max_offset + static_cast<u32>(sizeof(float));
53 } 53 }
54 54
55 u32 GetMaxOffset() const { 55 u32 GetMaxOffset() const {
@@ -165,8 +165,8 @@ public:
165 return program_manager.GetVariables(); 165 return program_manager.GetVariables();
166 } 166 }
167 167
168 u32 ConvertAddressToNvidiaSpace(const u32 address) const { 168 u32 ConvertAddressToNvidiaSpace(u32 address) const {
169 return (address - main_offset) * sizeof(Tegra::Shader::Instruction); 169 return (address - main_offset) * static_cast<u32>(sizeof(Tegra::Shader::Instruction));
170 } 170 }
171 171
172 /// Returns a condition code evaluated from internal flags 172 /// Returns a condition code evaluated from internal flags