summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
authorGravatar bunnei2015-05-22 19:40:57 -0400
committerGravatar bunnei2015-05-22 19:40:57 -0400
commit7b94b312d39037e9a90c981b49743965c0d1a743 (patch)
treef922946de22f54bf0c0aaaff01371f5ca7a2fc57 /src/core/hle
parentMerge pull request #798 from yuriks/y2r-bw (diff)
parentFlush for y2r (moflex) (diff)
downloadyuzu-7b94b312d39037e9a90c981b49743965c0d1a743.tar.gz
yuzu-7b94b312d39037e9a90c981b49743965c0d1a743.tar.xz
yuzu-7b94b312d39037e9a90c981b49743965c0d1a743.zip
Merge pull request #789 from tfarley/opengl-renderer
OpenGL Hardware Renderer
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/gsp_gpu.cpp9
-rw-r--r--src/core/hle/service/y2r_u.cpp11
2 files changed, 20 insertions, 0 deletions
diff --git a/src/core/hle/service/gsp_gpu.cpp b/src/core/hle/service/gsp_gpu.cpp
index c11c5faba..c56475ae4 100644
--- a/src/core/hle/service/gsp_gpu.cpp
+++ b/src/core/hle/service/gsp_gpu.cpp
@@ -15,6 +15,7 @@
15#include "core/hw/lcd.h" 15#include "core/hw/lcd.h"
16 16
17#include "video_core/gpu_debugger.h" 17#include "video_core/gpu_debugger.h"
18#include "video_core/video_core.h"
18 19
19// Main graphics debugger object - TODO: Here is probably not the best place for this 20// Main graphics debugger object - TODO: Here is probably not the best place for this
20GraphicsDebugger g_debugger; 21GraphicsDebugger g_debugger;
@@ -264,6 +265,8 @@ static void FlushDataCache(Service::Interface* self) {
264 u32 size = cmd_buff[2]; 265 u32 size = cmd_buff[2];
265 u32 process = cmd_buff[4]; 266 u32 process = cmd_buff[4];
266 267
268 VideoCore::g_renderer->hw_rasterizer->NotifyFlush(Memory::VirtualToPhysicalAddress(address), size);
269
267 // TODO(purpasmart96): Verify return header on HW 270 // TODO(purpasmart96): Verify return header on HW
268 271
269 cmd_buff[1] = RESULT_SUCCESS.raw; // No error 272 cmd_buff[1] = RESULT_SUCCESS.raw; // No error
@@ -352,10 +355,16 @@ static void ExecuteCommand(const Command& command, u32 thread_id) {
352 355
353 // GX request DMA - typically used for copying memory from GSP heap to VRAM 356 // GX request DMA - typically used for copying memory from GSP heap to VRAM
354 case CommandId::REQUEST_DMA: 357 case CommandId::REQUEST_DMA:
358 VideoCore::g_renderer->hw_rasterizer->NotifyPreRead(Memory::VirtualToPhysicalAddress(command.dma_request.source_address),
359 command.dma_request.size);
360
355 memcpy(Memory::GetPointer(command.dma_request.dest_address), 361 memcpy(Memory::GetPointer(command.dma_request.dest_address),
356 Memory::GetPointer(command.dma_request.source_address), 362 Memory::GetPointer(command.dma_request.source_address),
357 command.dma_request.size); 363 command.dma_request.size);
358 SignalInterrupt(InterruptId::DMA); 364 SignalInterrupt(InterruptId::DMA);
365
366 VideoCore::g_renderer->hw_rasterizer->NotifyFlush(Memory::VirtualToPhysicalAddress(command.dma_request.dest_address),
367 command.dma_request.size);
359 break; 368 break;
360 369
361 // ctrulib homebrew sends all relevant command list data with this command, 370 // ctrulib homebrew sends all relevant command list data with this command,
diff --git a/src/core/hle/service/y2r_u.cpp b/src/core/hle/service/y2r_u.cpp
index ce822e990..15987e028 100644
--- a/src/core/hle/service/y2r_u.cpp
+++ b/src/core/hle/service/y2r_u.cpp
@@ -9,7 +9,11 @@
9#include "core/hle/hle.h" 9#include "core/hle/hle.h"
10#include "core/hle/kernel/event.h" 10#include "core/hle/kernel/event.h"
11#include "core/hle/service/y2r_u.h" 11#include "core/hle/service/y2r_u.h"
12#include "core/mem_map.h"
13#include "core/memory.h"
14
12#include "video_core/utils.h" 15#include "video_core/utils.h"
16#include "video_core/video_core.h"
13 17
14//////////////////////////////////////////////////////////////////////////////////////////////////// 18////////////////////////////////////////////////////////////////////////////////////////////////////
15// Namespace Y2R_U 19// Namespace Y2R_U
@@ -260,6 +264,13 @@ static void StartConversion(Service::Interface* self) {
260 break; 264 break;
261 } 265 }
262 } 266 }
267
268 // dst_image_size would seem to be perfect for this, but it doesn't include the stride :(
269 u32 total_output_size = conversion_params.input_lines *
270 (conversion_params.dst_transfer_unit + conversion_params.dst_stride);
271 VideoCore::g_renderer->hw_rasterizer->NotifyFlush(
272 Memory::VirtualToPhysicalAddress(conversion_params.dst_address), total_output_size);
273
263 LOG_DEBUG(Service_Y2R, "called"); 274 LOG_DEBUG(Service_Y2R, "called");
264 completion_event->Signal(); 275 completion_event->Signal();
265 276