2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #2080 from yuriks/shader-interp-crash

VideoCore: Fix dangling lambda context in shader interpreter
This commit is contained in:
Yuri Kunde Schlesner 2016-09-15 22:47:20 -07:00 committed by GitHub
commit 8bf09b5302

View file

@ -77,7 +77,7 @@ void RunInterpreter(const ShaderSetup& setup, UnitState<Debug>& state, unsigned
const Instruction instr = { program_code[program_counter] }; const Instruction instr = { program_code[program_counter] };
const SwizzlePattern swizzle = { swizzle_data[instr.common.operand_desc_id] }; const SwizzlePattern swizzle = { swizzle_data[instr.common.operand_desc_id] };
static auto call = [&program_counter, &call_stack](UnitState<Debug>& state, u32 offset, u32 num_instructions, auto call = [&program_counter, &call_stack](UnitState<Debug>& state, u32 offset, u32 num_instructions,
u32 return_offset, u8 repeat_count, u8 loop_increment) { u32 return_offset, u8 repeat_count, u8 loop_increment) {
program_counter = offset - 1; // -1 to make sure when incrementing the PC we end up at the correct offset program_counter = offset - 1; // -1 to make sure when incrementing the PC we end up at the correct offset
ASSERT(call_stack.size() < call_stack.capacity()); ASSERT(call_stack.size() < call_stack.capacity());