Hi! How do I practically use Zink? I’ve read all kinds of stuff alluding to what Zink does and how cool it is and stuff, but nowhere is there a practical example of initializing a program with it as the OpenGL backend in use.
From research, I’ve seen some environment variables that I thought might force zink usage and give me information about whether it’s in use, so I’ve tried prepending this to an OpenGL program command line:
ZINK_DEBUG="nir,spirv,tgsi,validation" MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink
I tried with this at first:
ZINK_DEBUG="nir,spirv,tgsi,validation" MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink glxgears -info
I got no zink debug information that I was expecting, or any other indication that zink was in use, so I tried running RetroArch like this:
ZINK_DEBUG="nir,spirv,tgsi,validation" MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink retroarch -v 2>&1
I made sure to set the driver to “gl” in RetroArch, then I tried restarting it with the same command line and setting it to “glcore”, and restarting it again. While RA loaded with all of those attempts just fine, none of those attempts showed any zink-related output in my terminal, so I still have no idea if zink was in use.
So, how do I even check if it’s in use, let alone make it be used? It’s so confusing, especially when there’s a post on Reddit from a year ago with someone claiming to have run Minecraft with zink: https://www.reddit.com/r/linux_gaming/comments/hkq51m/minecraft_running_with_zink/ . They don’t explain how they did it, and nowhere else seems to make it obvious to me.
If anyone has some insight about this, please let me know. I’m still getting familiar with this stuff.
By the way, my rationale for trying zink is that some native Linux games I’ve played that use the OpenGL backend have exhibited extreme Z-fighting while using DXVK when running the Windows version of the same games have not. If zink fixes this with my driver, I’d like to use it instead of raw OpenGL.