{"id":1545,"date":"2024-10-07T20:30:01","date_gmt":"2024-10-07T19:30:01","guid":{"rendered":"https:\/\/seegras.discordia.ch\/Blog\/?p=1545"},"modified":"2024-10-07T20:43:25","modified_gmt":"2024-10-07T19:43:25","slug":"minecraft-on-vulkan","status":"publish","type":"post","link":"https:\/\/seegras.discordia.ch\/Blog\/minecraft-on-vulkan\/","title":{"rendered":"Minecraft on Vulkan"},"content":{"rendered":"\n<p>For some time I noticed some serious problems with Minecraft: It was a resource-hog, slow and depending on the modpack, on the lower end of fps, that&#8217;s like 15, on my old RTX2060 and on my newer RX7800XT. Even with the rendering distance capped to 16 or 12 to make it playable.<\/p>\n\n\n\n<p>A few weeks ago it also started braking steam. Like, making it impossible to run Steam at the same time as Minecraft without Steam becoming a slideshow. Something was off. <\/p>\n\n\n\n<p>I had the slight suspicion games using Vulkan did behave better, and weren&#8217;t causing the issue, so I wanted to try it with Minecraft as well. There is <a href=\"https:\/\/modrinth.com\/mod\/vulkanmod\">VulkanMod<\/a> for Minecraft, and there are even a few modpacks like <a href=\"https:\/\/modrinth.com\/modpack\/vulkan-optimized\" data-type=\"link\" data-id=\"https:\/\/modrinth.com\/modpack\/vulkan-optimized\">Vulkan Optimized<\/a> and <a href=\"https:\/\/modrinth.com\/modpack\/vulkan32\" data-type=\"link\" data-id=\"https:\/\/modrinth.com\/modpack\/vulkan32\">Vulkan32<\/a>. I tried both of these, and ended up using <a href=\"https:\/\/modrinth.com\/modpack\/vulkan-optimized\">Vulkan Optimized<\/a> as a base for adding a few other mods, like Journeymap, Tech Reborn or AE2. No Create though, as this is incompatible with VulkanMod. And there it was. 60fps with a rendering distance of 32. While running Steam at full steam, pun intended, at the same time. <\/p>\n\n\n\n<p>I was also now clear that my OpenGL was horribly broken, and I couldn&#8217;t find any hint of &#8220;how&#8221;, as at the same time the performance under Vulkan was marvellous. And how could I run any other Minecraft modpack, not just those using version 1.20.1 and 1.21.1 on fabric, without Create or Hephaestos mods, under Vulkan? <\/p>\n\n\n\n<p>Turns out, there is a translation layer available, called <a href=\"https:\/\/www.collabora.com\/news-and-blog\/blog\/2018\/10\/31\/introducing-zink-opengl-implementation-vulkan\/\" data-type=\"link\" data-id=\"https:\/\/www.collabora.com\/news-and-blog\/blog\/2018\/10\/31\/introducing-zink-opengl-implementation-vulkan\/\">Zink<\/a> which is part of Mesa. Alright, let&#8217;s try: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ MESA_LOADER_DRIVER_OVERRIDE=zink  glxinfo \nname of display: :0\nDRI3 not available<\/code><\/pre>\n\n\n\n<p>That wasn&#8217;t quite encouraging, especially since: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ xdpyinfo | grep DRI3  \n    DRI3<\/code><\/pre>\n\n\n\n<p>It&#8217;s configured and working, of course. <\/p>\n\n\n\n<p>Turns out this is a bug or regression on X11 (Seems to work on Wayland), and if you also give it LIBGL_KOPPER_DRI2=1, it works:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ MESA_LOADER_DRIVER_OVERRIDE=zink LIBGL_KOPPER_DRI2=1  glxinfo | grep \"OpenGL renderer\" \nOpenGL renderer string: zink Vulkan 1.3(AMD Radeon RX 7800 XT (RADV NAVI32) (MESA_RADV))<\/code><\/pre>\n\n\n\n<p>And oh, boy, it works. I put these two variables into the env of the PrismLauncher settings of <a href=\"https:\/\/modrinth.com\/modpack\/atfb\">All The Fabric 5<\/a> and this is the result:<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"129\" class=\"wp-image-1546\" style=\"width: 800px;\" src=\"https:\/\/seegras.discordia.ch\/Blog\/wp-content\/uploads\/2024\/10\/2024-10-07_20.16.50.png\" alt=\"Screenshot showing F3-Screen. Notably 60 of 60fps, and zink\/Vulkan as driver. At render distance 64(!)\" srcset=\"https:\/\/seegras.discordia.ch\/Blog\/wp-content\/uploads\/2024\/10\/2024-10-07_20.16.50.png 1870w, https:\/\/seegras.discordia.ch\/Blog\/wp-content\/uploads\/2024\/10\/2024-10-07_20.16.50-300x48.png 300w, https:\/\/seegras.discordia.ch\/Blog\/wp-content\/uploads\/2024\/10\/2024-10-07_20.16.50-1024x165.png 1024w, https:\/\/seegras.discordia.ch\/Blog\/wp-content\/uploads\/2024\/10\/2024-10-07_20.16.50-768x124.png 768w, https:\/\/seegras.discordia.ch\/Blog\/wp-content\/uploads\/2024\/10\/2024-10-07_20.16.50-1536x247.png 1536w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n\n\n\n<p>And, what you can&#8217;t see here, is that the render distance is at max, which happens to be 62(!) with All The Fabric 5. It&#8217;s glorious. <\/p>\n\n\n\n<p>I&#8217;ll now go and test this out with some modpacks that had gotten unplayably slow before: Project Architect 2, ATM10, AoF7&#8230;<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For some time I noticed some serious problems with Minecraft: It was a resource-hog, slow and depending on the modpack, on the lower end of fps, that&#8217;s like 15, on my old RTX2060 and on my newer RX7800XT. Even with the rendering distance capped to 16 or 12 to make it playable. A few weeks [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,102,97],"tags":[105,130,129,132],"class_list":["post-1545","post","type-post","status-publish","format-standard","hentry","category-computers","category-games","category-minecraft","tag-minecraft","tag-opengl","tag-vulkan","tag-zink"],"_links":{"self":[{"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/posts\/1545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/comments?post=1545"}],"version-history":[{"count":2,"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/posts\/1545\/revisions"}],"predecessor-version":[{"id":1548,"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/posts\/1545\/revisions\/1548"}],"wp:attachment":[{"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/media?parent=1545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/categories?post=1545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/tags?post=1545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}