SlideShare a Scribd company logo
Crossing Platforms:
Bringing Call of Duty to Mobile
Unite Copenhagen 2019
Crossing platforms: bringing call of duty to mobile – Unite Copenhagen 2019
Galaxy GameDev: since 2016
Crossing platforms: bringing call of duty to mobile – Unite Copenhagen 2019
Bringing Call of Duty to Mobile
• Call of Duty Mobile
• Adaptive Performance
• Vulkan Optimizations
Crossing platforms: bringing call of duty to mobile – Unite Copenhagen 2019
Call of Duty Mobile
Call of Duty Mobile
Call of Duty Mobile
Call of Duty Mobile
Call of Duty Mobile
Crossing platforms: bringing call of duty to mobile – Unite Copenhagen 2019
Mobile Limitation
FPS
Core Freq
Temperature After Throttling
• Temperature
– No active cooling
– Performance Throttling
• Power
– Limitation of Battery
– Use more power than needed
• Performance
– Hardware Fragmentation causes
different capabilities between devices
Developers can’t control
Adaptive Performance
GalaxyGame SDK
14
Get device performance
status and thermal trends
Proactively adjust performance
and quality settings on the fly
Power Manager
Power Budget Control
CPU Level
CPU
Level
CPU
Level
GPU Level
GPU
Level
GPU
Level
core freq
freq cap
Power Manager
Frame Time Tracking
1.0 ms
Bottleneck Detection
Frame
Time
CPU
Time
GPU
Time
Target
FPS
CPU
GPUGPU
Time
CPU
Time
Frame
Time
Bottleneck Detection
Frame
Time
CPU
Time
GPU
Time
Target
FPS
CPU
GPU
1.0 ms
1.0 ms
Default Power Manager
Auto Perf Control
Temp
Trend
Target FPS
U/D CPU
U/D GPU
Value
U/D CPU
U/D GPU
Update
Interval
CPU Level
CPU Level CPU Level
GPU Level
GPU Level GPU Level
Temp
Trend
Bottleneck Detection
Frame
Time
CPU
Time
GPU
Time
Target
FPS
CPU
GPU
Bottleneck
Mode
Allow U/D
CPU
Allow U/D
GPU
GPU
Time
CPU
Time
Frame
Time
Crossing platforms: bringing call of duty to mobile – Unite Copenhagen 2019
Power Manager + Dynamic Quality Scaling
30
15
200 10
Time [m]
Adaptive Performance is now available
Adaptive Performance is now available
21
Adaptive Performance in Call of Duty Mobile
• Quality Scale Factors
• Shadow Distance
• Foliage LoD
• Animation LoD
• Target Frame Rate
• Power Management
• Bottleneck Detection
• CPU/GPU Power Budget Control
Adaptive Performance
Feature Parameter Scaling Impact
Shadow Distance 80 ~ 50 CPU 0~10% offloading
Foliage LOD 1 ~ 0.8 GPU 0~5% offloading
Animation LOD 0 ~ 2 CPU 0~3% offloading
GPU 0~1% offloading
Target Frame Rate 57 ~ 60 CPU 0~5% offloading
GPU 0~5% offloading
Shadow Distance(80 ~ 50)
Foliage LOD(1.0 ~ 0.8)
Adaptive Performance
• Adaptive Performance
vs Normal Condition
Feature ADP Normal
FPS 58 54
Stability (%) 100 100
CPU (%) 11.37 11.69
GPU (%) 80.08 87.85
FPS
ADP-FPS Normal-FPS
Adaptive Performance
• Can save power and
manage thermal better
Feature ADP Normal
FPS 58 54
Stability (%) 100 100
CPU (%) 11.37 11.69
GPU (%) 80.08 87.85
Temperature
Normal ADP 60 160 260 360 460
Max Freq
ADP-CPU ADP-GPU
Normal-CPU Normal-GPU
Crossing platforms: bringing call of duty to mobile – Unite Copenhagen 2019
Vulkan Optimizations in Call of Duty Mobile
• Single Scratch Buffer
• Low Priority Destroy Thread
• Descriptor Set Batching/Caching
• RenderPass Load/Store
• Threaded Present
• VB, IB Binding Optimization
• Direct Buffer Access
• Single Scratch Buffer
• Low Priority Destroy Thread
• Descriptor Set Batching/Caching
• RenderPass Load/Store
• Threaded Present
• VB, IB Binding Optimization
• Direct Buffer Access
Vulkan Optimizations
Vulkan Optimizations
— Ring buffer for all needs
— Usually recreated only during first load
Allocate Allocate Allocate
offset offset offset
Allocate
Free Memory
Allocate
Not enough memory
Larger buffer
• Single Scratch Buffer
Vulkan Optimizations
• Single Scratch Buffer
• Low Priority Destroy Thread
• Descriptor Set Batching/Caching
• RenderPass Load/Store
• Threaded Present
• VB, IB Binding Optimization
• Direct Buffer Access
Vulkan Optimizations
Signal
DestroyThread
• Low Priority Destroy Thread
Render thread Destroy thread
Delayed Destroy
Delayed Destroy
Delayed Destroy
Garbage Collect
vkDestroy***
vkDestroy***
vkDestroy***
Wait
Vulkan Optimizations
• Single Scratch Buffer
• Low Priority Destroy Thread
• Descriptor Set Batching/Caching
• RenderPass Load/Store
• Threaded Present
• VB, IB Binding Optimization
• Direct Buffer Access
Vulkan Optimizations
• Descriptor Set Batching/Caching
vkUpdateDescriptorSets
vkUpdateDescriptorSets
vkUpdateDescriptorSets
vkUpdateDescriptorSets
vkUpdateDescriptorSets
vkUpdateDescriptorSets
— Combine separate Update calls into one
Vulkan Optimizations
• Descriptor Set Batching/Caching
— Cache and reuse sets with same resources
AllocateDS
+
UpdateDS
BindDS
+
Draw
…
AllocateDS
+
UpdateDS
BindDS
+
Draw
…
AllocateDS
+
UpdateDS
BindDS
+
Draw
… …
AllocateDS
+
UpdateDS
BindDS
+
Draw
…
BindDS
+
Draw
……
BindDS
+
Draw
…
Allocate and update Descriptor Sets before each draw call
Reuse Descriptors Sets from cache
Vulkan Optimizations
• Descriptor Set Batching/Caching
— Cache and reuse sets with same resources
BindDS
+
Draw
…
BindDS
+
Draw
…
BindDS
+
Draw
… …
AllocateDS
+
UpdateDS
BindDS
+
Draw
…
BindDS
+
Draw
……
BindDS
+
Draw
…
AllocateDS
+
UpdateDS
AllocateDS
+
UpdateDS
AllocateDS
+
UpdateDS
Allocate and update Descriptor Sets before each draw call
Reuse Descriptors Sets from cache
Vulkan Optimizations
• Descriptor Set Batching/Caching
— Cache and reuse sets with same resources
AllocateDS
+
UpdateDS
BindDS
+
Draw
…
Allocate and update Descriptor Sets before each draw call
Reuse Descriptors Sets from cache
AllocateDS
+
UpdateDS
BindDS
+
Draw
…
AllocateDS
+
UpdateDS
BindDS
+
Draw
… …
BindDS
+
Draw
…
BindDS
+
Draw
……
BindDS
+
Draw
…
AllocateDS
+
UpdateDS
Vulkan Optimizations
• Single Scratch Buffer
• Low Priority Destroy Thread
• Descriptor Set Batching/Caching
• RenderPass Load/Store
• Threaded Present
• VB, IB Binding Optimization
• Direct Buffer Access
Vulkan Optimizations
• RenderPass Load/Store
When render target is being fully redrawn there
is no need to load previous data.
Vulkan Optimizations
• Single Scratch Buffer
• Low Priority Destroy Thread
• Descriptor Set Batching/Caching
• RenderPass Load/Store
• Threaded Present
• VB, IB Binding Optimization
• Direct Buffer Access
Vulkan Optimizations
• Threaded Present
Prepare Render Present Prepare
Prepare Render Prepare
Present
Original
Threaded present
Render thread
Present thread
Render thread
Vulkan Optimizations
• Single Scratch Buffer
• Low Priority Destroy Thread
• Descriptor Set Batching/Caching
• RenderPass Load/Store
• Threaded Present
• VB, IB Binding Optimization
• Direct Buffer Access
Vulkan Optimizations
• VB, IB Binding Optimization
As buffers are same there is no need to bind
them every draw call.
Vulkan Optimizations
• Single Scratch Buffer
• Low Priority Destroy Thread
• Descriptor Set Batching/Caching
• RenderPass Load/Store
• Threaded Present
• VB, IB Binding Optimization
• Direct Buffer Access
Vulkan Optimizations
Upload
(vertex/index/uniform data)
Main thread
Copy
Device bufferRender thread
Memory
Memory
Copy
Upload
(vertex/index/uniform data)
Main thread
Copy
Device buffer
Render thread
• Direct Buffer Access
Original
Direct access
Crossing platforms: bringing call of duty to mobile – Unite Copenhagen 2019
Crossing platforms: bringing call of duty to mobile – Unite Copenhagen 2019
Thank You!
gamedev@samsung.com

More Related Content

Crossing platforms: bringing call of duty to mobile – Unite Copenhagen 2019

  • 1. Crossing Platforms: Bringing Call of Duty to Mobile Unite Copenhagen 2019
  • 5. Bringing Call of Duty to Mobile • Call of Duty Mobile • Adaptive Performance • Vulkan Optimizations
  • 7. Call of Duty Mobile
  • 8. Call of Duty Mobile
  • 9. Call of Duty Mobile
  • 10. Call of Duty Mobile
  • 11. Call of Duty Mobile
  • 13. Mobile Limitation FPS Core Freq Temperature After Throttling • Temperature – No active cooling – Performance Throttling • Power – Limitation of Battery – Use more power than needed • Performance – Hardware Fragmentation causes different capabilities between devices Developers can’t control
  • 14. Adaptive Performance GalaxyGame SDK 14 Get device performance status and thermal trends Proactively adjust performance and quality settings on the fly
  • 15. Power Manager Power Budget Control CPU Level CPU Level CPU Level GPU Level GPU Level GPU Level core freq freq cap
  • 16. Power Manager Frame Time Tracking 1.0 ms Bottleneck Detection Frame Time CPU Time GPU Time Target FPS CPU GPUGPU Time CPU Time Frame Time Bottleneck Detection Frame Time CPU Time GPU Time Target FPS CPU GPU 1.0 ms 1.0 ms
  • 17. Default Power Manager Auto Perf Control Temp Trend Target FPS U/D CPU U/D GPU Value U/D CPU U/D GPU Update Interval CPU Level CPU Level CPU Level GPU Level GPU Level GPU Level Temp Trend Bottleneck Detection Frame Time CPU Time GPU Time Target FPS CPU GPU Bottleneck Mode Allow U/D CPU Allow U/D GPU GPU Time CPU Time Frame Time
  • 19. Power Manager + Dynamic Quality Scaling 30 15 200 10 Time [m]
  • 20. Adaptive Performance is now available
  • 21. Adaptive Performance is now available 21
  • 22. Adaptive Performance in Call of Duty Mobile • Quality Scale Factors • Shadow Distance • Foliage LoD • Animation LoD • Target Frame Rate • Power Management • Bottleneck Detection • CPU/GPU Power Budget Control
  • 23. Adaptive Performance Feature Parameter Scaling Impact Shadow Distance 80 ~ 50 CPU 0~10% offloading Foliage LOD 1 ~ 0.8 GPU 0~5% offloading Animation LOD 0 ~ 2 CPU 0~3% offloading GPU 0~1% offloading Target Frame Rate 57 ~ 60 CPU 0~5% offloading GPU 0~5% offloading Shadow Distance(80 ~ 50) Foliage LOD(1.0 ~ 0.8)
  • 24. Adaptive Performance • Adaptive Performance vs Normal Condition Feature ADP Normal FPS 58 54 Stability (%) 100 100 CPU (%) 11.37 11.69 GPU (%) 80.08 87.85 FPS ADP-FPS Normal-FPS
  • 25. Adaptive Performance • Can save power and manage thermal better Feature ADP Normal FPS 58 54 Stability (%) 100 100 CPU (%) 11.37 11.69 GPU (%) 80.08 87.85 Temperature Normal ADP 60 160 260 360 460 Max Freq ADP-CPU ADP-GPU Normal-CPU Normal-GPU
  • 27. Vulkan Optimizations in Call of Duty Mobile • Single Scratch Buffer • Low Priority Destroy Thread • Descriptor Set Batching/Caching • RenderPass Load/Store • Threaded Present • VB, IB Binding Optimization • Direct Buffer Access
  • 28. • Single Scratch Buffer • Low Priority Destroy Thread • Descriptor Set Batching/Caching • RenderPass Load/Store • Threaded Present • VB, IB Binding Optimization • Direct Buffer Access Vulkan Optimizations
  • 29. Vulkan Optimizations — Ring buffer for all needs — Usually recreated only during first load Allocate Allocate Allocate offset offset offset Allocate Free Memory Allocate Not enough memory Larger buffer • Single Scratch Buffer
  • 30. Vulkan Optimizations • Single Scratch Buffer • Low Priority Destroy Thread • Descriptor Set Batching/Caching • RenderPass Load/Store • Threaded Present • VB, IB Binding Optimization • Direct Buffer Access
  • 31. Vulkan Optimizations Signal DestroyThread • Low Priority Destroy Thread Render thread Destroy thread Delayed Destroy Delayed Destroy Delayed Destroy Garbage Collect vkDestroy*** vkDestroy*** vkDestroy*** Wait
  • 32. Vulkan Optimizations • Single Scratch Buffer • Low Priority Destroy Thread • Descriptor Set Batching/Caching • RenderPass Load/Store • Threaded Present • VB, IB Binding Optimization • Direct Buffer Access
  • 33. Vulkan Optimizations • Descriptor Set Batching/Caching vkUpdateDescriptorSets vkUpdateDescriptorSets vkUpdateDescriptorSets vkUpdateDescriptorSets vkUpdateDescriptorSets vkUpdateDescriptorSets — Combine separate Update calls into one
  • 34. Vulkan Optimizations • Descriptor Set Batching/Caching — Cache and reuse sets with same resources AllocateDS + UpdateDS BindDS + Draw … AllocateDS + UpdateDS BindDS + Draw … AllocateDS + UpdateDS BindDS + Draw … … AllocateDS + UpdateDS BindDS + Draw … BindDS + Draw …… BindDS + Draw … Allocate and update Descriptor Sets before each draw call Reuse Descriptors Sets from cache
  • 35. Vulkan Optimizations • Descriptor Set Batching/Caching — Cache and reuse sets with same resources BindDS + Draw … BindDS + Draw … BindDS + Draw … … AllocateDS + UpdateDS BindDS + Draw … BindDS + Draw …… BindDS + Draw … AllocateDS + UpdateDS AllocateDS + UpdateDS AllocateDS + UpdateDS Allocate and update Descriptor Sets before each draw call Reuse Descriptors Sets from cache
  • 36. Vulkan Optimizations • Descriptor Set Batching/Caching — Cache and reuse sets with same resources AllocateDS + UpdateDS BindDS + Draw … Allocate and update Descriptor Sets before each draw call Reuse Descriptors Sets from cache AllocateDS + UpdateDS BindDS + Draw … AllocateDS + UpdateDS BindDS + Draw … … BindDS + Draw … BindDS + Draw …… BindDS + Draw … AllocateDS + UpdateDS
  • 37. Vulkan Optimizations • Single Scratch Buffer • Low Priority Destroy Thread • Descriptor Set Batching/Caching • RenderPass Load/Store • Threaded Present • VB, IB Binding Optimization • Direct Buffer Access
  • 38. Vulkan Optimizations • RenderPass Load/Store When render target is being fully redrawn there is no need to load previous data.
  • 39. Vulkan Optimizations • Single Scratch Buffer • Low Priority Destroy Thread • Descriptor Set Batching/Caching • RenderPass Load/Store • Threaded Present • VB, IB Binding Optimization • Direct Buffer Access
  • 40. Vulkan Optimizations • Threaded Present Prepare Render Present Prepare Prepare Render Prepare Present Original Threaded present Render thread Present thread Render thread
  • 41. Vulkan Optimizations • Single Scratch Buffer • Low Priority Destroy Thread • Descriptor Set Batching/Caching • RenderPass Load/Store • Threaded Present • VB, IB Binding Optimization • Direct Buffer Access
  • 42. Vulkan Optimizations • VB, IB Binding Optimization As buffers are same there is no need to bind them every draw call.
  • 43. Vulkan Optimizations • Single Scratch Buffer • Low Priority Destroy Thread • Descriptor Set Batching/Caching • RenderPass Load/Store • Threaded Present • VB, IB Binding Optimization • Direct Buffer Access
  • 44. Vulkan Optimizations Upload (vertex/index/uniform data) Main thread Copy Device bufferRender thread Memory Memory Copy Upload (vertex/index/uniform data) Main thread Copy Device buffer Render thread • Direct Buffer Access Original Direct access