#!/usr/bin/env bash

# Limpia variables NVIDIA
unset __GLX_VENDOR_LIBRARY_NAME
unset __NV_PRIME_RENDER_OFFLOAD
unset __VK_LAYER_NV_optimus

# Fuerza iGPU AMD
export LIBVA_DRIVER_NAME=radeonsi
export VDPAU_DRIVER=radeonsi
export DRI_PRIME=1
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json
export LIBVA_DRIVER_NAME=radeonsi  # Forzar VA-API en AMD

# Evitar nvdec/vdpau cargando cosas de NVIDIA
export VDPAU_DRIVER=radeonsi

# Ejecuta mpv
exec /usr/bin/mpv "$@"

