summaryrefslogtreecommitdiff
path: root/src/video_core/gpu.cpp
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-04-27 22:07:21 -0400
committerGravatar Fernando Sahmkow2020-04-27 22:07:21 -0400
commitb87422a86f4dd3b59ef91c3ce37945865a6cfbef (patch)
treef7a0231f8a226f2dc73ca84fe77aa066f8b912d4 /src/video_core/gpu.cpp
parentVideoCore/Engines: Refactor Engines CallMethod. (diff)
downloadyuzu-b87422a86f4dd3b59ef91c3ce37945865a6cfbef.tar.gz
yuzu-b87422a86f4dd3b59ef91c3ce37945865a6cfbef.tar.xz
yuzu-b87422a86f4dd3b59ef91c3ce37945865a6cfbef.zip
VideoCore/GPU: Delegate subchannel engines to the dma pusher.
Diffstat (limited to 'src/video_core/gpu.cpp')
-rw-r--r--src/video_core/gpu.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp
index 4868437c1..f10d69fd5 100644
--- a/src/video_core/gpu.cpp
+++ b/src/video_core/gpu.cpp
@@ -347,7 +347,27 @@ void GPU::ProcessBindMethod(const MethodCall& method_call) {
347 // Bind the current subchannel to the desired engine id. 347 // Bind the current subchannel to the desired engine id.
348 LOG_DEBUG(HW_GPU, "Binding subchannel {} to engine {}", method_call.subchannel, 348 LOG_DEBUG(HW_GPU, "Binding subchannel {} to engine {}", method_call.subchannel,
349 method_call.argument); 349 method_call.argument);
350 bound_engines[method_call.subchannel] = static_cast<EngineID>(method_call.argument); 350 auto engine_id = static_cast<EngineID>(method_call.argument);
351 bound_engines[method_call.subchannel] = static_cast<EngineID>(engine_id);
352 switch (engine_id) {
353 case EngineID::FERMI_TWOD_A:
354 dma_pusher->BindSubchannel(fermi_2d.get(), method_call.subchannel);
355 break;
356 case EngineID::MAXWELL_B:
357 dma_pusher->BindSubchannel(maxwell_3d.get(), method_call.subchannel);
358 break;
359 case EngineID::KEPLER_COMPUTE_B:
360 dma_pusher->BindSubchannel(kepler_compute.get(), method_call.subchannel);
361 break;
362 case EngineID::MAXWELL_DMA_COPY_A:
363 dma_pusher->BindSubchannel(maxwell_dma.get(), method_call.subchannel);
364 break;
365 case EngineID::KEPLER_INLINE_TO_MEMORY_B:
366 dma_pusher->BindSubchannel(kepler_memory.get(), method_call.subchannel);
367 break;
368 default:
369 UNIMPLEMENTED_MSG("Unimplemented engine");
370 }
351} 371}
352 372
353void GPU::ProcessSemaphoreTriggerMethod() { 373void GPU::ProcessSemaphoreTriggerMethod() {