diff options
| author | bunnei <bunneidev@gmail.com> | 2018-04-29 21:47:42 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-29 21:47:42 -0400 |
| commit | 225ff1130ffc79dcbf667c73284774397f32f667 (patch) | |
| tree | 536436a8c81538747e12e385391f1592758efd54 /src/video_core/engines | |
| parent | b3962e7d1e585f33461f1a0f11c825cf261f6c7d (diff) | |
| parent | f41eb95e13b88a55572887c3b5e4890bcb84edb2 (diff) | |
Merge pull request #422 from bunnei/shader-mov
Shader instructions MOV_C, MOV_R, and several minor GPU things
Diffstat (limited to 'src/video_core/engines')
| -rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 10 | ||||
| -rw-r--r-- | src/video_core/engines/shader_bytecode.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 835e5fe78..23e70cd8a 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -208,6 +208,16 @@ void Maxwell3D::DrawArrays() { const bool is_indexed{regs.index_array.count && !regs.vertex_buffer.count}; VideoCore::g_renderer->Rasterizer()->AccelerateDrawBatch(is_indexed); + + // TODO(bunnei): Below, we reset vertex count so that we can use these registers to determine if + // the game is trying to draw indexed or direct mode. This needs to be verified on HW still - + // it's possible that it is incorrect and that there is some other register used to specify the + // drawing mode. + if (is_indexed) { + regs.index_array.count = 0; + } else { + regs.vertex_buffer.count = 0; + } } void Maxwell3D::ProcessCBBind(Regs::ShaderStage stage) { diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index f20c2cd41..e1ceec268 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h @@ -310,6 +310,7 @@ public: SHR_C, SHR_R, SHR_IMM, + FMNMX, FSETP_C, // Set Predicate FSETP_R, FSETP_IMM, @@ -460,6 +461,7 @@ private: INST("0100110000101---", Id::SHR_C, Type::Arithmetic, "SHR_C"), INST("0101110000101---", Id::SHR_R, Type::Arithmetic, "SHR_R"), INST("0011100-00101---", Id::SHR_IMM, Type::Arithmetic, "SHR_IMM"), + INST("0101110001100---", Id::FMNMX, Type::Arithmetic, "FMNMX"), INST("0100110011100---", Id::I2I_C, Type::Conversion, "I2I_C"), INST("0101110011100---", Id::I2I_R, Type::Conversion, "I2I_R"), INST("01110001-1000---", Id::I2I_IMM, Type::Conversion, "I2I_IMM"), |
