summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/vi
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-01-09 03:30:22 +0100
committerbunnei <bunneidev@gmail.com>2018-01-11 05:28:29 +0100
commit34ae2ec644f49b04d6c6b82742812b6a8a3ef8b5 (patch)
treeb3b01b63dd0fa4fdc240a549257b685595f277cf /src/core/hle/service/vi
parentNV: Determine what buffer to draw for each layer of each display. (diff)
downloadyuzu-34ae2ec644f49b04d6c6b82742812b6a8a3ef8b5.tar
yuzu-34ae2ec644f49b04d6c6b82742812b6a8a3ef8b5.tar.gz
yuzu-34ae2ec644f49b04d6c6b82742812b6a8a3ef8b5.tar.bz2
yuzu-34ae2ec644f49b04d6c6b82742812b6a8a3ef8b5.tar.lz
yuzu-34ae2ec644f49b04d6c6b82742812b6a8a3ef8b5.tar.xz
yuzu-34ae2ec644f49b04d6c6b82742812b6a8a3ef8b5.tar.zst
yuzu-34ae2ec644f49b04d6c6b82742812b6a8a3ef8b5.zip
Diffstat (limited to 'src/core/hle/service/vi')
-rw-r--r--src/core/hle/service/vi/vi.cpp15
-rw-r--r--src/core/hle/service/vi/vi.h3
2 files changed, 16 insertions, 2 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp
index 67d82c2bf..56aafe6bf 100644
--- a/src/core/hle/service/vi/vi.cpp
+++ b/src/core/hle/service/vi/vi.cpp
@@ -6,6 +6,7 @@
#include "common/scope_exit.h"
#include "core/core_timing.h"
#include "core/hle/ipc_helpers.h"
+#include "core/hle/service/nvdrv/nvdrv_a.h"
#include "core/hle/service/vi/vi.h"
#include "core/hle/service/vi/vi_m.h"
@@ -743,7 +744,19 @@ void NVFlinger::Compose() {
continue;
}
- // TODO(Subv): Send the buffer to the GPU for drawing.
+ auto& igbp_buffer = buffer->igbp_buffer;
+
+ // Now send the buffer to the GPU for drawing.
+ auto nvdrv = NVDRV::nvdrv_a.lock();
+ ASSERT(nvdrv);
+
+ // TODO(Subv): Support more than just disp0. The display device selection is probably based
+ // on which display we're drawing (Default, Internal, External, etc)
+ auto nvdisp = nvdrv->GetDevice<NVDRV::nvdisp_disp0>("/dev/nvdisp_disp0");
+ ASSERT(nvdisp);
+
+ nvdisp->flip(igbp_buffer.gpu_buffer_id, igbp_buffer.offset, igbp_buffer.format,
+ igbp_buffer.width, igbp_buffer.height, igbp_buffer.stride);
buffer_queue->ReleaseBuffer(buffer->slot);
}
diff --git a/src/core/hle/service/vi/vi.h b/src/core/hle/service/vi/vi.h
index 576c4ce32..9604bd1c2 100644
--- a/src/core/hle/service/vi/vi.h
+++ b/src/core/hle/service/vi/vi.h
@@ -25,7 +25,8 @@ struct IGBPBuffer {
u32_le gpu_buffer_id;
INSERT_PADDING_WORDS(17);
u32_le nvmap_handle;
- INSERT_PADDING_WORDS(61);
+ u32_le offset;
+ INSERT_PADDING_WORDS(60);
};
static_assert(sizeof(IGBPBuffer) == 0x16C, "IGBPBuffer has wrong size");