diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/file_sys/disk_archive.cpp | 2 | ||||
-rw-r--r-- | src/video_core/command_processor.cpp | 3 | ||||
-rw-r--r-- | src/video_core/pica.h | 7 | ||||
-rw-r--r-- | src/video_core/shader/shader_jit_x64.cpp | 6 |
4 files changed, 12 insertions, 6 deletions
diff --git a/src/core/file_sys/disk_archive.cpp b/src/core/file_sys/disk_archive.cpp index 1096fd34d..e9ecd2b1c 100644 --- a/src/core/file_sys/disk_archive.cpp +++ b/src/core/file_sys/disk_archive.cpp @@ -102,7 +102,7 @@ bool DiskFile::Open() { mode_string += "b"; file = Common::make_unique<FileUtil::IOFile>(path, mode_string.c_str()); - return true; + return file->IsOpen(); } size_t DiskFile::Read(const u64 offset, const size_t length, u8* buffer) const { diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index a78985510..682be89ec 100644 --- a/src/video_core/command_processor.cpp +++ b/src/video_core/command_processor.cpp @@ -235,7 +235,8 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) { for (unsigned int index = 0; index < regs.num_vertices; ++index) { - unsigned int vertex = is_indexed ? (index_u16 ? index_address_16[index] : index_address_8[index]) : index; + // Indexed rendering doesn't use the start offset + unsigned int vertex = is_indexed ? (index_u16 ? index_address_16[index] : index_address_8[index]) : (index + regs.vertex_offset); // -1 is a common special value used for primitive restart. Since it's unknown if // the PICA supports it, and it would mess up the caching, guard against it here. diff --git a/src/video_core/pica.h b/src/video_core/pica.h index f40684d83..5811eb9bc 100644 --- a/src/video_core/pica.h +++ b/src/video_core/pica.h @@ -769,7 +769,12 @@ struct Regs { // Number of vertices to render u32 num_vertices; - INSERT_PADDING_WORDS(0x5); + INSERT_PADDING_WORDS(0x1); + + // The index of the first vertex to render + u32 vertex_offset; + + INSERT_PADDING_WORDS(0x3); // These two trigger rendering of triangles u32 trigger_draw; diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp index d3cfe109e..c7b63a9b7 100644 --- a/src/video_core/shader/shader_jit_x64.cpp +++ b/src/video_core/shader/shader_jit_x64.cpp @@ -434,10 +434,10 @@ void JitCompiler::Compile_SGE(Instruction instr) { Compile_SwizzleSrc(instr, 2, instr.common.src2, SRC2); } - CMPPS(SRC1, R(SRC2), CMP_NLT); - ANDPS(SRC1, R(ONE)); + CMPPS(SRC2, R(SRC1), CMP_LE); + ANDPS(SRC2, R(ONE)); - Compile_DestEnable(instr, SRC1); + Compile_DestEnable(instr, SRC2); } void JitCompiler::Compile_SLT(Instruction instr) { |