diff options
author | bunnei <bunneidev@gmail.com> | 2016-03-18 00:51:43 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2016-04-14 05:04:43 +0200 |
commit | 135aec7beab9e484183565eea9d3cab03fe0b879 (patch) | |
tree | 5f5a753d2a48bff8eade3517476451446e40c206 /src | |
parent | emitter: Support arbitrary FixupBranch targets. (diff) | |
download | yuzu-135aec7beab9e484183565eea9d3cab03fe0b879.tar yuzu-135aec7beab9e484183565eea9d3cab03fe0b879.tar.gz yuzu-135aec7beab9e484183565eea9d3cab03fe0b879.tar.bz2 yuzu-135aec7beab9e484183565eea9d3cab03fe0b879.tar.lz yuzu-135aec7beab9e484183565eea9d3cab03fe0b879.tar.xz yuzu-135aec7beab9e484183565eea9d3cab03fe0b879.tar.zst yuzu-135aec7beab9e484183565eea9d3cab03fe0b879.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/shader/shader_jit_x64.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp index dffe051ef..d74b58d84 100644 --- a/src/video_core/shader/shader_jit_x64.cpp +++ b/src/video_core/shader/shader_jit_x64.cpp @@ -741,7 +741,9 @@ void JitCompiler::Compile_Block(unsigned end) { void JitCompiler::Compile_NextInstr(unsigned* offset) { offset_ptr = offset; - Instruction instr = *(Instruction*)&g_state.vs.program_code[(*offset_ptr)++]; + Instruction instr; + std::memcpy(&instr, &g_state.vs.program_code[(*offset_ptr)++], sizeof(Instruction)); + OpCode::Id opcode = instr.opcode.Value(); auto instr_func = instr_table[static_cast<unsigned>(opcode)]; |