eden-miror/src/video_core
CamilleLaVey 372bdfccbc
[vulkan, android] Mediacodec implementation + Vulkan fixes (#4191)
This is the first step into the conversion on full GPU video decoding for Android; currently due to the VIC structure, I couldn't set it on surface mode to prevent the latency when sending video decoded (which is processed by GPU now), because currently we convert YUV420 into the Nvidia's format each frame constantly on CPU, aside the requirements from other extensions to work + VIC rewrite, which is a work currently not planned to happen on this PR; the actual configuration for video decoding is ByteBuffer, using GPU to decode NVDEC data (all codecs supported, h264, vp8 and vp9) and send it to CPU for display purposes, which is more faster than relying purely on CPU for any drawing task, saving devices resources/ heating, the downside on this will be the slight latency when a new frame is displayed, which is gonna be a black frame for less than a second, nothing major to harm the experience rather than actually trying our best to take advantage on hardware accelerated.

Aside this, I also added a bunch of minor Vulkan fixes to grant drivers less thinkering when receiving spir-v instructions, meaning this has new bans for extensions on QCOM (following reported issues on other projects working around Adreno driver behavior), this more than providing performance aims to enhance the stability on the driver, performance it's gonna likely to be hit based on the UBO's (StorageBufferAccess) operations and SSBO (uniformStorageBufferAccess), there was an already existing path for the emulation which forces to wide them into 32bit packed operations. I also included some smaller changes/ bugs + VUID's fixes from earlier changes on my work.

Special Thanks:

-> Mr. Smoly Gidolard (@gidoly)

Sources:

1.- https://github.com/microsoft/DirectXShaderCompiler/issues/2842
2.- https://github.com/mlc-ai/web-llm/issues/836
3.- https://github.com/ggml-org/llama.cpp/issues/5186
4.- https://github.com/encounter/aurora/pull/202

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4191
2026-07-09 06:55:54 +02:00
..
buffer_cache [buffer_cache] Add option to control GPU buffer readback (#4126) 2026-06-27 08:38:04 +02:00
control [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
engines [maxwell_3d] append inline index draw streams in bulk (#4083) 2026-06-27 02:52:59 +02:00
gpu_logging xbzk/gpu-logging_qt-controls_android-fix (#4018) 2026-06-27 02:52:13 +02:00
host1x [vulkan, android] Mediacodec implementation + Vulkan fixes (#4191) 2026-07-09 06:55:54 +02:00
host_shaders [video_core] Implementation on ASTC HDR formats + Vulkan fixes (#4190) 2026-07-09 05:29:50 +02:00
query_cache [vulkan] 2nd Vulkan Global Maintenance (#3853) 2026-04-24 16:37:18 +02:00
renderer_null nvnflinger/gpu: implement applet capture 2024-02-09 09:20:53 -05:00
renderer_opengl [vk, ogl] Remove dedicated precomputed swizzle table; use shorter inline table in block_linear swizzle shaders (#4146) 2026-07-02 19:24:07 +02:00
renderer_vulkan [vulkan, android] Mediacodec implementation + Vulkan fixes (#4191) 2026-07-09 06:55:54 +02:00
texture_cache [vulkan] 3rd Vulkan Global Maintenance (#4189) 2026-07-09 04:22:43 +02:00
textures [video_core] Implementation on ASTC HDR formats + Vulkan fixes (#4190) 2026-07-09 05:29:50 +02:00
vulkan_common [vulkan, android] Mediacodec implementation + Vulkan fixes (#4191) 2026-07-09 06:55:54 +02:00
cache_types.h
capture.h nvnflinger/gpu: implement applet capture 2024-02-09 09:20:53 -05:00
cdma_pusher.cpp [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
cdma_pusher.h [video_core] fix H264 and jthread() causing spurious errors (#3907) 2026-04-29 19:23:20 +02:00
CMakeLists.txt [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
compatible_formats.cpp renderer_vulkan: Fix some missing view formats 2023-07-01 16:03:35 +03:00
compatible_formats.h
delayed_destruction_ring.h [VK] Rework SPIRV Shader Optimization (#238) 2025-07-03 01:13:33 +00:00
dirty_flags.cpp
dirty_flags.h [scheduler, dma, maxwell] Reduce CPU stalls in the GPU command processing pipeline through multiple targeted optimizations (#3296) 2026-01-18 03:45:18 +01:00
dma_pusher.cpp [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
dma_pusher.h [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
fence_manager.h [vk,fence_manager] improvement for antiflicker showed bad for some games, so it was removed from balanced/accurate and kept for antiflicker toggle only (#4010) 2026-05-26 01:41:11 +02:00
framebuffer_config.cpp video_core: simplify accelerated surface fetch and crop handling between APIs 2024-01-31 11:27:20 -05:00
framebuffer_config.h nvnflinger/gpu: implement blending 2024-02-09 09:20:53 -05:00
fsr.cpp [common] replace Common::BitCast with libc++ provided one (#2774) 2025-10-22 02:56:28 +02:00
fsr.h [common] replace Common::BitCast with libc++ provided one (#2774) 2025-10-22 02:56:28 +02:00
gpu.cpp [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
gpu.h [vk, opengl] defer checks to topmost call (avoid unnecessary call) (#40) 2025-07-13 03:40:48 +02:00
gpu_thread.cpp [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
gpu_thread.h [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
guest_memory.h Core: Clang format and other small issues. 2024-01-18 21:12:30 -05:00
invalidation_accumulator.h [video_core] simplify InvalidationAccumulator (#3890) 2026-04-28 00:24:54 +02:00
macro.cpp xbzk/gpu-logging_qt-controls_android-fix (#4018) 2026-06-27 02:52:13 +02:00
macro.h [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
memory_manager.cpp [video_core] simplify InvalidationAccumulator (#3890) 2026-04-28 00:24:54 +02:00
memory_manager.h [video_core] simplify InvalidationAccumulator (#3890) 2026-04-28 00:24:54 +02:00
present.h gpu: dependency-inject scaling/antialiasing filter state for capture layers 2024-02-09 09:20:53 -05:00
pte_kind.h [video_core] correct not-quite-correct PTE_kind enumeration (#4077) 2026-06-15 22:05:18 +02:00
query_cache.h [*] change all std::unordered_map and std::unordered_set into ankerl::unordered_dense::map/set variants (#3442) 2026-02-10 03:34:07 +01:00
rasterizer_download_area.h Rework time service to fix time passing offline. 2024-01-24 04:26:55 +00:00
rasterizer_interface.h [Rasterizer]: Implement "Skip CPU Inner Invalidation" hack 2025-07-09 04:23:22 +02:00
renderer_base.cpp [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
renderer_base.h nvnflinger/gpu: implement applet capture 2024-02-09 09:20:53 -05:00
shader_cache.cpp [compat] Debian stable gcc12/clang14 compilation fixes (#2763) 2025-10-18 01:54:43 +02:00
shader_cache.h [*] change all std::unordered_map and std::unordered_set into ankerl::unordered_dense::map/set variants (#3442) 2026-02-10 03:34:07 +01:00
shader_environment.cpp [video_core] gate Mesa EXIT terminator detection behind non-proprietary driver (#4151) 2026-07-01 13:06:00 +02:00
shader_environment.h [common] rework BitField and BitUtil, use concepts whenever possible (#4076) 2026-07-09 03:47:04 +02:00
shader_notify.cpp
shader_notify.h
smaa_area_tex.h [*] basic in-house cpp linting (#4039) 2026-06-04 05:49:07 +02:00
smaa_search_tex.h [*] basic in-house cpp linting (#4039) 2026-06-04 05:49:07 +02:00
surface.cpp [vulkan] 3rd Vulkan Global Maintenance (#4189) 2026-07-09 04:22:43 +02:00
surface.h [vulkan] 3rd Vulkan Global Maintenance (#4189) 2026-07-09 04:22:43 +02:00
transform_feedback.cpp [vulkan] 2nd Vulkan Global Maintenance (#3853) 2026-04-24 16:37:18 +02:00
transform_feedback.h Remove memory allocations in some hot paths 2023-06-22 08:05:10 +01:00
video_core.cpp [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
video_core.h [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00