diff options
| author | bunnei <bunneidev@gmail.com> | 2020-05-05 17:12:42 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-05 17:12:42 -0400 | 
| commit | 41682e0888f7cb640787ab8d9a7e5c0ebb83d8fa (patch) | |
| tree | 64c61fda0aaa076cd54c46e8c271e67888c79c61 /src/video_core/gpu.cpp | |
| parent | 88141bb2d44f26d1015be2cd832284bf322bc3b2 (diff) | |
| parent | eb2c50c5e692e13608c1d354473c3b22277c687e (diff) | |
Merge pull request #3815 from FernandoS27/command-list-2
GPU: More optimizations to GPU Command List Processing and DMA Copy Optimizations
Diffstat (limited to 'src/video_core/gpu.cpp')
| -rw-r--r-- | src/video_core/gpu.cpp | 34 | 
1 files changed, 28 insertions, 6 deletions
| diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index b87fd873d..8eb017f65 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp @@ -299,19 +299,21 @@ void GPU::CallEngineMethod(const MethodCall& method_call) {      switch (engine) {      case EngineID::FERMI_TWOD_A: -        fermi_2d->CallMethod(method_call); +        fermi_2d->CallMethod(method_call.method, method_call.argument, method_call.IsLastCall());          break;      case EngineID::MAXWELL_B: -        maxwell_3d->CallMethod(method_call); +        maxwell_3d->CallMethod(method_call.method, method_call.argument, method_call.IsLastCall());          break;      case EngineID::KEPLER_COMPUTE_B: -        kepler_compute->CallMethod(method_call); +        kepler_compute->CallMethod(method_call.method, method_call.argument, +                                   method_call.IsLastCall());          break;      case EngineID::MAXWELL_DMA_COPY_A: -        maxwell_dma->CallMethod(method_call); +        maxwell_dma->CallMethod(method_call.method, method_call.argument, method_call.IsLastCall());          break;      case EngineID::KEPLER_INLINE_TO_MEMORY_B: -        kepler_memory->CallMethod(method_call); +        kepler_memory->CallMethod(method_call.method, method_call.argument, +                                  method_call.IsLastCall());          break;      default:          UNIMPLEMENTED_MSG("Unimplemented engine"); @@ -347,7 +349,27 @@ void GPU::ProcessBindMethod(const MethodCall& method_call) {      // Bind the current subchannel to the desired engine id.      LOG_DEBUG(HW_GPU, "Binding subchannel {} to engine {}", method_call.subchannel,                method_call.argument); -    bound_engines[method_call.subchannel] = static_cast<EngineID>(method_call.argument); +    const auto engine_id = static_cast<EngineID>(method_call.argument); +    bound_engines[method_call.subchannel] = static_cast<EngineID>(engine_id); +    switch (engine_id) { +    case EngineID::FERMI_TWOD_A: +        dma_pusher->BindSubchannel(fermi_2d.get(), method_call.subchannel); +        break; +    case EngineID::MAXWELL_B: +        dma_pusher->BindSubchannel(maxwell_3d.get(), method_call.subchannel); +        break; +    case EngineID::KEPLER_COMPUTE_B: +        dma_pusher->BindSubchannel(kepler_compute.get(), method_call.subchannel); +        break; +    case EngineID::MAXWELL_DMA_COPY_A: +        dma_pusher->BindSubchannel(maxwell_dma.get(), method_call.subchannel); +        break; +    case EngineID::KEPLER_INLINE_TO_MEMORY_B: +        dma_pusher->BindSubchannel(kepler_memory.get(), method_call.subchannel); +        break; +    default: +        UNIMPLEMENTED_MSG("Unimplemented engine {:04X}", static_cast<u32>(engine_id)); +    }  }  void GPU::ProcessSemaphoreTriggerMethod() { | 
