Descargar CV (PDF)Download CV (PDF)下载简历(PDF)

Caso de estudio · InvestigaciónCase study · Research案例 · 研究

Reescalar juegos con IA usando la GPU que nadie usaUpscaling games with AI on the GPU nobody uses用没人使用的 GPU,以 AI 放大游戏画面

Trabajo de Fin de Grado: un sistema híbrido dGPU + iGPU que reconstruye cada frame a resolución completa en tiempo real, sin modificar el juego. Nota: 10 con mención a Matrícula de Honor.Bachelor's thesis: a hybrid dGPU + iGPU system that rebuilds every frame at full resolution in real time, without modifying the game. Graded 10/10 with distinction.学士毕业论文:一套 dGPU + iGPU 混合系统,无需修改游戏,实时把每一帧重建为完整分辨率。成绩满分 10 分并获最高荣誉。

PeriodoPeriod期间
Mar 2025 – Jul 2026Mar 2025 – Jul 20262025 年 3 月 – 2026 年 7 月
TipoType类型
TFG · Universidad de AlicanteThesis · Univ. of Alicante毕业论文 · 阿利坎特大学
ResultadoResult成果
10 · Matrícula de Honor10/10 · distinction满分 10 分 · 最高荣誉
StackStack技术
C · Python · OpenGL/GLX · OpenVINO · ONNX Runtime · Linux
Minecraft con shaders Photon: un río entre bambú, reconstruido a 1080p por FSRCNN en la iGPU desde 640×360
Frame reconstruido por la iGPU: el juego renderizó a 640×360 y lo que ves sale a 1080p.Frame rebuilt by the iGPU: the game rendered at 640×360 and what you see comes out at 1080p.由 iGPU 重建的画面:游戏以 640×360 渲染,你看到的是 1080p 输出。

El problemaThe problem问题

La mayoría de equipos de juego tienen dos GPUs: la dedicada (dGPU), que renderiza el juego, y una integrada (iGPU) dentro del procesador. Durante una partida, la dedicada va al límite y la integrada está prácticamente parada. Es potencia de cálculo que ya has pagado y no usas.

Most gaming machines have two GPUs: the dedicated one (dGPU) that renders the game, and an integrated one (iGPU) inside the CPU. During a session the dGPU is maxed out while the iGPU sits almost idle — compute you've paid for and never use.

大多数游戏电脑都有两颗 GPU:负责渲染游戏的独立显卡(dGPU),以及处理器里的内置显示芯片(iGPU)。游戏进行时,dGPU 全力运转,iGPU 却几乎闲置——这是你付了钱却没用到的算力。

DLSS, FSR y XeSS hacen el reescalado en la misma GPU que renderiza, así que compiten por ella. La pregunta del trabajo: ¿se puede pasar esa carga a la iGPU, en tiempo real y sin tocar el juego?

DLSS, FSR and XeSS upscale on the same GPU that renders, so they compete for it. The question: can that load move to the iGPU, in real time, without touching the game?

DLSS、FSR 和 XeSS 都在负责渲染的同一颗 GPU 上做放大,所以会互相抢资源。研究的问题是:能不能把这份工作实时地交给 iGPU,而且完全不修改游戏?

La arquitecturaThe architecture架构

La dGPU renderiza el juego en pequeño; el frame viaja una sola vez por el bus PCIe hasta la memoria principal y la iGPU, que comparte esa memoria con la CPU, lo reconstruye a resolución completa. El jugador solo ve la reconstrucción.

The dGPU renders the game small; the frame crosses the PCIe bus once into main memory, and the iGPU — which shares that memory with the CPU — rebuilds it at full resolution. The player only sees the reconstruction.

dGPU 以低分辨率渲染游戏;画面只经过一次 PCIe 总线进入主内存,而与 CPU 共用这块内存的 iGPU 再把它重建为完整分辨率。玩家看到的只有重建后的画面。

Figura 3.1 de la memoria: reparto de tareas entre CPU, iGPU y dGPU.Figure 3.1 from the thesis: how work is split between CPU, iGPU and dGPU.论文图 3.1:CPU、iGPU 与 dGPU 之间的工作分配。

Cómo funciona por dentroHow it works inside内部运作方式

Es un sistema completo que funciona con cualquier aplicación OpenGL en Linux, sin modificarla. Todo el código es abierto.

It's an end-to-end system that works with any OpenGL application on Linux, unmodified. All the code is open source.

这是一套完整的端到端系统,可用于 Linux 上任何 OpenGL 应用程序,无需修改。所有代码皆为开源。

  1. RenderRender渲染El juego corre oculto en una pantalla virtual (Xvfb) y la dGPU lo renderiza a baja resolución vía PRIME.The game runs hidden on a virtual display (Xvfb) and the dGPU renders it at low resolution via PRIME.游戏隐藏在虚拟屏幕(Xvfb)上运行,dGPU 通过 PRIME 以低分辨率渲染。
  2. CapturaCapture截取Una librería en C inyectada con LD_PRELOAD intercepta glXSwapBuffers y copia el frame.A C library injected with LD_PRELOAD intercepts glXSwapBuffers and copies the frame.通过 LD_PRELOAD 注入的 C 库拦截 glXSwapBuffers 并复制画面。
  3. TransferenciaTransfer传输El frame se publica en memoria compartida POSIX, sin copias extra.The frame is published to POSIX shared memory, with no extra copies.画面发布到 POSIX 共享内存,没有额外的复制。
  4. ReconstrucciónRebuild重建La iGPU lo reescala con FSRCNN (OpenVINO) y se muestra en una sola ventana.The iGPU upscales it with FSRCNN (OpenVINO) and it's shown in a single window.iGPU 以 FSRCNN(OpenVINO)放大画面,并显示在单一窗口中。

Los detalles que costaronThe details that took work费了一番功夫的细节

  • Motores modernos: Minecraft (LWJGL3/GLFW) no llama a glXSwapBuffers directamente, sino que pide el puntero en tiempo de ejecución. El wrapper intercepta también dlsym y glXGetProcAddressARB.Modern engines: Minecraft (LWJGL3/GLFW) doesn't call glXSwapBuffers directly; it asks for the pointer at runtime. The wrapper also intercepts dlsym and glXGetProcAddressARB.现代引擎:Minecraft(LWJGL3/GLFW)不会直接调用 glXSwapBuffers,而是在运行时取得函数指针。因此封装库也会拦截 dlsym 与 glXGetProcAddressARB。
  • Shaders que esconden el frame: Iris/Photon dejan un framebuffer intermedio enlazado y la captura se paraba en silencio. Se fuerza la lectura del framebuffer de la ventana y se restaura después.Shaders hiding the frame: Iris/Photon leave an intermediate framebuffer bound and capture silently stopped. The wrapper forces a read from the window framebuffer and restores it afterwards.把画面藏起来的着色器:Iris/Photon 会留下一个中间 framebuffer,导致截取无声无息地停止。封装库会强制从窗口的 framebuffer 读取,之后再恢复原状。
  • Captura sin presentación: en la pantalla virtual, presentar cada frame por software era el cuello de botella. Como nadie ve esa pantalla, el wrapper captura y no presenta: el render pasó de ~13 a 44,6 FPS.Capture without presenting: on the virtual display, presenting each frame in software was the bottleneck. Since nobody sees that display, the wrapper captures and skips presenting: render went from ~13 to 44.6 FPS.只截取、不呈现:在虚拟屏幕上,用软件呈现每一帧是性能瓶颈。既然没人看那个屏幕,封装库就只截取、不呈现:渲染从约 13 FPS 提升到 44.6 FPS。
  • Jugar de verdad: teclado y ratón se reenvían al juego oculto con XTEST, en modo relativo durante la partida y absoluto en los menús.Actually playable: keyboard and mouse are forwarded to the hidden game via XTEST — relative during gameplay, absolute in menus.真的能玩:键盘与鼠标通过 XTEST 转送到隐藏的游戏——游戏中用相对移动,菜单中用绝对坐标。

Qué salióResults成果

Ocho experimentos en un sobremesa con Intel Core Ultra 7 265K (con iGPU) y NVIDIA RTX 5060, usando glxgears, SuperTuxKart y Minecraft con el paquete de shaders Photon para saturar la dGPU.

Eight experiments on a desktop with an Intel Core Ultra 7 265K (with iGPU) and an NVIDIA RTX 5060, using glxgears, SuperTuxKart and Minecraft with the Photon shader pack to saturate the dGPU.

在一台搭载 Intel Core Ultra 7 265K(含 iGPU)与 NVIDIA RTX 5060 的台式机上进行了八项实验,使用 glxgears、SuperTuxKart,以及加上 Photon 着色器包、足以让 dGPU 满载的 Minecraft。

  • +33 %de fluidez frente a renderizar nativo a 1080p (57,6 frente a 43,4 FPS).smoother than native rendering at 1080p (57.6 vs 43.4 FPS).比 1080p 原生渲染更流畅(57.6 对 43.4 FPS)。
  • ×2casi, frente al nativo en 4K (54,9 frente a 25,7 FPS).almost, versus native at 4K (54.9 vs 25.7 FPS).几乎是 4K 原生渲染的两倍(54.9 对 25.7 FPS)。
  • 15/15combinaciones en las que la iGPU gana a hacer la IA en la propia dGPU, hasta +26,6 FPS.combinations where the iGPU beats running the AI on the dGPU itself, up to +26.6 FPS.在所有组合中,把 AI 交给 iGPU 都胜过在 dGPU 上运行,最多高出 26.6 FPS。
  • <1 mspara capturar y mover cada frame: menos del 3 % del retardo.to capture and move each frame: under 3% of the latency.截取并传输每一帧的时间:不到总延迟的 3%。
FPS del juego con escala x3: híbrida (IA en iGPU), dedicada (IA en dGPU) y render nativo.Game FPS at x3 scale: hybrid (AI on iGPU), dedicated (AI on dGPU) and native render.x3 倍率下的游戏 FPS:混合式(AI 在 iGPU)、专用式(AI 在 dGPU)与原生渲染。

La clave está en un experimento de carga: con la dGPU libre, la inferencia allí es 2,5 veces más rápida que en la iGPU. Pero cuando la dGPU está ocupada renderizando, su tiempo se triplica (de 4,1 a 11,1 ms) mientras la iGPU sigue estable. La ventaja no es que la iGPU sea más rápida: es que libera a la dGPU justo cuando más falta hace.

The key is a load experiment: with the dGPU free, inference there is 2.5× faster than on the iGPU. But once the dGPU is busy rendering, its time triples (4.1 → 11.1 ms) while the iGPU stays flat. The win isn't that the iGPU is faster — it's that it frees the dGPU exactly when it's needed.

关键在于一项负载实验:dGPU 空闲时,在它上面推论比 iGPU 快 2.5 倍。但一旦 dGPU 忙着渲染,推论时间就变成三倍(4.1 → 11.1 毫秒),而 iGPU 则维持稳定。优势不在于 iGPU 比较快,而在于它刚好在最需要的时候让 dGPU 喘口气。

Modos de calidadQuality modes画质模式

Como en DLSS, el sistema ofrece tres preajustes (salida 1080p):

Like DLSS, the system offers three presets (1080p output):

和 DLSS 一样,系统提供三种预设(1080p 输出):

ModoMode模式RenderRender渲染FPSPSNR
RendimientoPerformance性能480×270 · x46029.3 dB
EquilibradoBalanced平衡640×360 · x34831.0 dB
CalidadQuality质量960×540 · x22535.0 dB
De arriba abajo: nativo, bicúbico y FSRCNN en la iGPU (modo Equilibrado).Top to bottom: native, bicubic and FSRCNN on the iGPU (Balanced mode).由上到下:原生、双三次插值,以及 iGPU 上的 FSRCNN(平衡模式)。

Y una conclusión honesta: la calidad la manda la resolución a la que renderizas (+11 dB de 144p a 720p), no el modelo. FSRCNN se eligió por ligero, no por listo, y apenas mejora al bicúbico. El margen de calidad está en usar un modelo mejor; la arquitectura ya funciona.

And an honest takeaway: quality is driven by the render resolution (+11 dB from 144p to 720p), not the model. FSRCNN was picked for being light, not clever, and barely beats bicubic. The quality headroom is in a better model; the architecture already works.

还有一个诚实的结论:画质取决于渲染分辨率(从 144p 到 720p 提升 11 dB),而不是模型。选 FSRCNN 是因为它轻量,而不是因为它聪明,它几乎没有胜过双三次插值。画质的提升空间在于更好的模型;架构本身已经可行。

Lo que me llevoWhat I took away收获

Empezó en unas prácticas en la EPS en marzo de 2025 y acabó siendo el TFG en julio de 2026. Me obligó a bajar a capas que en la carrera solo había visto de pasada: interceptar llamadas de OpenGL, pelearme con drivers, compositores y servidores gráficos.

It started as an internship at the EPS in March 2025 and became my thesis in July 2026. It pushed me into layers I'd only glimpsed at university: intercepting OpenGL calls, wrestling with drivers, compositors and display servers.

它从 2025 年 3 月在理工学院的实习开始,并在 2026 年 7 月成为我的毕业论文。它逼我深入大学里只稍微碰过的层面:拦截 OpenGL 调用、和驱动程序、合成器与显示服务器奋斗。

Lo que más me enseñó fueron los errores: medidas que tuve que repetir por dejar el juego abierto de fondo, o una pantalla virtual que durante semanas parecía hacer inviable la arquitectura y acabó siendo su mejor escenario. Lo siguiente sería pasar el postprocesado a la GPU, montar un pipeline asíncrono y probar la NPU del procesador.

What taught me most were the mistakes: measurements I had to redo because the game was left running in the background, or a virtual display that for weeks seemed to kill the idea and ended up being its best setup. Next steps would be moving post-processing to the GPU, an asynchronous pipeline and trying the CPU's NPU.

教会我最多的是犯错:因为游戏还在背景运行而必须重做的测量,或是一个有好几周看起来会让整个构想行不通、最后却成为最佳配置的虚拟屏幕。下一步会是把后处理移到 GPU、创建异步流程,并试试处理器的 NPU。

Nota: 10 · Matrícula de HonorGrade: 10/10 · with distinction成绩:满分 10 分 · 最高荣誉Tutores: Antonio Macía Lillo e Higinio Mora Mora (Dpto. de Tecnología Informática y Computación, Universidad de Alicante).Supervisors: Antonio Macía Lillo and Higinio Mora Mora (Dept. of Computer Technology, University of Alicante).指导老师:Antonio Macía Lillo 与 Higinio Mora Mora(阿利坎特大学计算机技术系)。

Leer la memoria en RUARead the thesis (RUA, Spanish)阅读论文(RUA,西班牙语)Código en GitHubCode on GitHubGitHub 上的代码

¿Buscas a alguien para un equipo así?Looking for someone for a team like this?在找能加入这种团队的人吗?

Disponible para incorporación inmediata. Suelo responder en menos de 24 h.Available to start now. I usually reply within 24 h.可立即到职。我通常在 24 小时内回复。

EscríbemeGet in touch联系我

EscríbemeGet in touch联系我 CV