summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp9
-rw-r--r--src/core/hle/service/nvflinger/buffer_queue.h4
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.cpp2
3 files changed, 8 insertions, 7 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
index ce6065db2..a33e47d0b 100644
--- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
@@ -42,15 +42,14 @@ void nvdisp_disp0::OnClose(DeviceFD fd) {}
42void nvdisp_disp0::flip(u32 buffer_handle, u32 offset, u32 format, u32 width, u32 height, 42void nvdisp_disp0::flip(u32 buffer_handle, u32 offset, u32 format, u32 width, u32 height,
43 u32 stride, NVFlinger::BufferQueue::BufferTransformFlags transform, 43 u32 stride, NVFlinger::BufferQueue::BufferTransformFlags transform,
44 const Common::Rectangle<int>& crop_rect) { 44 const Common::Rectangle<int>& crop_rect) {
45 VAddr addr = nvmap_dev->GetObjectAddress(buffer_handle); 45 const VAddr addr = nvmap_dev->GetObjectAddress(buffer_handle);
46 LOG_TRACE(Service, 46 LOG_TRACE(Service,
47 "Drawing from address {:X} offset {:08X} Width {} Height {} Stride {} Format {}", 47 "Drawing from address {:X} offset {:08X} Width {} Height {} Stride {} Format {}",
48 addr, offset, width, height, stride, format); 48 addr, offset, width, height, stride, format);
49 49
50 using PixelFormat = Tegra::FramebufferConfig::PixelFormat; 50 const auto pixel_format = static_cast<Tegra::FramebufferConfig::PixelFormat>(format);
51 const Tegra::FramebufferConfig framebuffer{ 51 const Tegra::FramebufferConfig framebuffer{addr, offset, width, height,
52 addr, offset, width, height, stride, static_cast<PixelFormat>(format), 52 stride, pixel_format, transform, crop_rect};
53 transform, crop_rect};
54 53
55 system.GetPerfStats().EndSystemFrame(); 54 system.GetPerfStats().EndSystemFrame();
56 system.GPU().SwapBuffers(&framebuffer); 55 system.GPU().SwapBuffers(&framebuffer);
diff --git a/src/core/hle/service/nvflinger/buffer_queue.h b/src/core/hle/service/nvflinger/buffer_queue.h
index 759247eb0..78de3f354 100644
--- a/src/core/hle/service/nvflinger/buffer_queue.h
+++ b/src/core/hle/service/nvflinger/buffer_queue.h
@@ -42,7 +42,9 @@ struct IGBPBuffer {
42 u32_le index; 42 u32_le index;
43 INSERT_PADDING_WORDS(3); 43 INSERT_PADDING_WORDS(3);
44 u32_le gpu_buffer_id; 44 u32_le gpu_buffer_id;
45 INSERT_PADDING_WORDS(17); 45 INSERT_PADDING_WORDS(6);
46 u32_le external_format;
47 INSERT_PADDING_WORDS(10);
46 u32_le nvmap_handle; 48 u32_le nvmap_handle;
47 u32_le offset; 49 u32_le offset;
48 INSERT_PADDING_WORDS(60); 50 INSERT_PADDING_WORDS(60);
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp
index 00bff8caf..3ead813b0 100644
--- a/src/core/hle/service/nvflinger/nvflinger.cpp
+++ b/src/core/hle/service/nvflinger/nvflinger.cpp
@@ -298,7 +298,7 @@ void NVFlinger::Compose() {
298 auto nvdisp = nvdrv->GetDevice<Nvidia::Devices::nvdisp_disp0>("/dev/nvdisp_disp0"); 298 auto nvdisp = nvdrv->GetDevice<Nvidia::Devices::nvdisp_disp0>("/dev/nvdisp_disp0");
299 ASSERT(nvdisp); 299 ASSERT(nvdisp);
300 300
301 nvdisp->flip(igbp_buffer.gpu_buffer_id, igbp_buffer.offset, igbp_buffer.format, 301 nvdisp->flip(igbp_buffer.gpu_buffer_id, igbp_buffer.offset, igbp_buffer.external_format,
302 igbp_buffer.width, igbp_buffer.height, igbp_buffer.stride, 302 igbp_buffer.width, igbp_buffer.height, igbp_buffer.stride,
303 buffer->get().transform, buffer->get().crop_rect); 303 buffer->get().transform, buffer->get().crop_rect);
304 304