From 2de764931141314357944627524767476d6d2cf9 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sat, 29 Jun 2019 14:01:44 -0400 Subject: [PATCH] shader_ir: limit explorastion to best known program size. --- src/video_core/shader/decode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/shader/decode.cpp b/src/video_core/shader/decode.cpp index 07a154d77..b0bd6630f 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)); disable_flow_stack = false; - const auto info = ScanFlow(program_code, MAX_PROGRAM_LENGTH * sizeof(u64), main_offset); + const auto info = ScanFlow(program_code, program_size, main_offset); if (info) { const auto& shader_info = *info; coverage_begin = shader_info.start;