diff options
| author | 2017-07-25 22:43:25 +0300 | |
|---|---|---|
| committer | 2017-08-19 10:13:20 +0300 | |
| commit | 28128348f21d83c30979ef10399a8a764bb08a73 (patch) | |
| tree | fa27a8ce4684e5eb0f18ae618b04e0c374bd69fb /src | |
| parent | pica/shader: extend UnitState for GS (diff) | |
| download | yuzu-28128348f21d83c30979ef10399a8a764bb08a73.tar.gz yuzu-28128348f21d83c30979ef10399a8a764bb08a73.tar.xz yuzu-28128348f21d83c30979ef10399a8a764bb08a73.zip | |
pica/shader/interpreter: implement SETEMIT and EMIT
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/shader/shader_interpreter.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/video_core/shader/shader_interpreter.cpp b/src/video_core/shader/shader_interpreter.cpp index 206c0978a..9d4da4904 100644 --- a/src/video_core/shader/shader_interpreter.cpp +++ b/src/video_core/shader/shader_interpreter.cpp | |||
| @@ -636,6 +636,22 @@ static void RunInterpreter(const ShaderSetup& setup, UnitState& state, DebugData | |||
| 636 | break; | 636 | break; |
| 637 | } | 637 | } |
| 638 | 638 | ||
| 639 | case OpCode::Id::EMIT: { | ||
| 640 | GSEmitter* emitter = state.emitter_ptr; | ||
| 641 | ASSERT_MSG(emitter, "Execute EMIT on VS"); | ||
| 642 | emitter->Emit(state.registers.output); | ||
| 643 | break; | ||
| 644 | } | ||
| 645 | |||
| 646 | case OpCode::Id::SETEMIT: { | ||
| 647 | GSEmitter* emitter = state.emitter_ptr; | ||
| 648 | ASSERT_MSG(emitter, "Execute SETEMIT on VS"); | ||
| 649 | emitter->vertex_id = instr.setemit.vertex_id; | ||
| 650 | emitter->prim_emit = instr.setemit.prim_emit != 0; | ||
| 651 | emitter->winding = instr.setemit.winding != 0; | ||
| 652 | break; | ||
| 653 | } | ||
| 654 | |||
| 639 | default: | 655 | default: |
| 640 | LOG_ERROR(HW_GPU, "Unhandled instruction: 0x%02x (%s): 0x%08x", | 656 | LOG_ERROR(HW_GPU, "Unhandled instruction: 0x%02x (%s): 0x%08x", |
| 641 | (int)instr.opcode.Value().EffectiveOpCode(), | 657 | (int)instr.opcode.Value().EffectiveOpCode(), |