diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-06-25 13:57:32 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-07-09 14:14:37 +0200 |
commit | 459fce3a8f26241ff2a68c323e75fb70e7e1ba79 (patch) | |
tree | 4b653d7dd8fd7e6d325ca69cdd1384187cbd73ac /src/video_core/shader/decode.cpp | |
parent | shader_ir: Implement BRX & BRA.CC (diff) | |
download | yuzu-459fce3a8f26241ff2a68c323e75fb70e7e1ba79.tar yuzu-459fce3a8f26241ff2a68c323e75fb70e7e1ba79.tar.gz yuzu-459fce3a8f26241ff2a68c323e75fb70e7e1ba79.tar.bz2 yuzu-459fce3a8f26241ff2a68c323e75fb70e7e1ba79.tar.lz yuzu-459fce3a8f26241ff2a68c323e75fb70e7e1ba79.tar.xz yuzu-459fce3a8f26241ff2a68c323e75fb70e7e1ba79.tar.zst yuzu-459fce3a8f26241ff2a68c323e75fb70e7e1ba79.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/shader/decode.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/shader/decode.cpp b/src/video_core/shader/decode.cpp index 65029d35e..09f55bd21 100644 --- a/src/video_core/shader/decode.cpp +++ b/src/video_core/shader/decode.cpp @@ -39,7 +39,7 @@ void ShaderIR::Decode() { std::memcpy(&header, program_code.data(), sizeof(Tegra::Shader::Header)); ShaderCharacteristics shader_info{}; - bool can_proceed = ScanFlow(program_code, MAX_PROGRAM_LENGTH, main_offset, shader_info); + bool can_proceed = ScanFlow(program_code, program_code.size(), main_offset, shader_info); if (can_proceed) { coverage_begin = shader_info.start; coverage_end = shader_info.end; @@ -52,12 +52,12 @@ void ShaderIR::Decode() { } return; } - LOG_CRITICAL(HW_GPU, "Flow Analysis failed, falling back to brute force compiling"); + LOG_WARNING(HW_GPU, "Flow Analysis failed, falling back to brute force compiling"); // Now we need to deal with an undecompilable shader. We need to brute force // a shader that captures every position. coverage_begin = shader_info.start; - const u32 shader_end = static_cast<u32>(MAX_PROGRAM_LENGTH); + const u32 shader_end = static_cast<u32>(program_size / sizeof(u64)); coverage_end = shader_end; for (u32 label = main_offset; label < shader_end; label++) { basic_blocks.insert({label, DecodeRange(label, label + 1)}); |