summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines/maxwell_3d.cpp
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-04-24 00:06:57 +0200
committerSubv <subv2112@gmail.com>2018-04-24 00:06:57 +0200
commitf20895358525f3a8abaefe3a5c2ebe7d30eadc78 (patch)
tree0164985533865c4eb65e21c4f646ee893dc7b48a /src/video_core/engines/maxwell_3d.cpp
parentMerge pull request #377 from adityaruplaha/sdl2-fullscreen (diff)
downloadyuzu-f20895358525f3a8abaefe3a5c2ebe7d30eadc78.tar
yuzu-f20895358525f3a8abaefe3a5c2ebe7d30eadc78.tar.gz
yuzu-f20895358525f3a8abaefe3a5c2ebe7d30eadc78.tar.bz2
yuzu-f20895358525f3a8abaefe3a5c2ebe7d30eadc78.tar.lz
yuzu-f20895358525f3a8abaefe3a5c2ebe7d30eadc78.tar.xz
yuzu-f20895358525f3a8abaefe3a5c2ebe7d30eadc78.tar.zst
yuzu-f20895358525f3a8abaefe3a5c2ebe7d30eadc78.zip
Diffstat (limited to 'src/video_core/engines/maxwell_3d.cpp')
-rw-r--r--src/video_core/engines/maxwell_3d.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 2a3ff234a..35773a695 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -147,11 +147,36 @@ void Maxwell3D::ProcessQueryGet() {
// VAddr before writing.
VAddr address = memory_manager.PhysicalToVirtualAddress(sequence_address);
+ // TODO(Subv): Support the other query units.
+ ASSERT_MSG(regs.query.query_get.unit == Regs::QueryUnit::Crop,
+ "Units other than CROP are unimplemented");
+ ASSERT_MSG(regs.query.query_get.short_query,
+ "Writing the entire query result structure is unimplemented");
+
+ u32 value = Memory::Read32(address);
+ u32 result = 0;
+
+ // TODO(Subv): Support the other query variables
+ switch (regs.query.query_get.select) {
+ case Regs::QuerySelect::Zero:
+ result = 0;
+ break;
+ default:
+ UNIMPLEMENTED_MSG("Unimplemented query select type %u",
+ static_cast<u32>(regs.query.query_get.select.Value()));
+ }
+
+ // TODO(Subv): Research and implement how query sync conditions work.
+
switch (regs.query.query_get.mode) {
- case Regs::QueryMode::Write: {
+ case Regs::QueryMode::Write:
+ case Regs::QueryMode::Write2: {
// Write the current query sequence to the sequence address.
u32 sequence = regs.query.query_sequence;
Memory::Write32(address, sequence);
+
+ // TODO(Subv): Write the proper query response structure to the address when not using short
+ // mode.
break;
}
default: